Forum Moderators: open
I know some possible pitfalls, but I am sure I don't know all of them, so I though we could pool resources with a definitive list of Tips and Traps.
Let me start off with Browser Settings in IE.
Problem: - IE sets background and text colour to the Windows settings by default which result in Black text on White Background. So it is easy to forget to set these in HTML as everything looks OK in the browser.
However, Netscape uses Black on Grey by default, which doesn't look anywhere near as good.
Remedy: - I use IE with the colour set to standard Gray Background Black Text. This allows me to double check I have set the background correctly in my pages.
And it appears a widespread trap that a lot of people forget about, from Moms and Pops right up to the likes of Microsoft and Yahoo. I have found it quite amazing the number of sites that do not set backround and text colour. They often end up with the very nice gifs surrounded by a little white set in a sea of grey. Not Nice!
Hope this helps, looking forward to more Tips and Traps from Members.
Onya
Woz
I found [tuxedo.org...] very re-assuring. The guy puts a bit of his own flavour into it, but I relate well to his grunts
It pretty much covers many of those "'90's type" home sites that were riddled with frontpage components and cut and paste code
body {
margin:0;
padding:0;
color:#000;
background:#fff;
font:11px verdana, arial, helvetica, sans-serif;
}
Of course, all the above values will be changed to suit your needs, but it covers the basics.
NOTE: I may include a line height along with my core font-size (11px/14px) but this might cause problems for other elements or .classes that assign a different font-size without a matching line-height. Be sure to test accordingly.
- papabaer
Trap: Watch out for this with cut-and-paste affiliate links. Many affiliate merchants forget to include height and width attributes for images in the cut-and-paste codes they supply. Take the time to figure out what they should be and include them.
For example IF you styled a <div> using the following INCORRECT CSS,
div.text-run-on {
width: 300;
height: 400;
}
The text placed within the above styled <div> will NOT word-wrap; you will see your text runing off into the distance.... Exit stage right!
Use units of measure for ALL values exceeding 0 (zero).
div.word-wrap {
width: 33%;
height: 400px;
padding:5px 30px 0 5px;
border:3px inset red;
}
- papabaer
Make sure the code actually controls the font, whether through HTML or CSS.
To do this, I set my default font to something a bit "off" like a script font. If you leave your default set to a sans-serif font, and your pages use a sans serif font, you'll never notice if the browser reverts to its default font instead of the font you intended.
The reason this is important, even when you have a CSS body declaration in place, is that browsers DO get confused. This happens especially when your code gets complex, with nested divs, etc.
Sometimes (if the user has a serif font as default, for instance) you need to include a redundant declaration, just to keep your pages from looking like ransom notes.
I've seen Opera 6 revert to the default font for an unordered list, even though there was a body font and a paragraph font declaration.
IE will revert in some complexly nested div situations.
And Netscape 4 is notorious for forgetting the body or paragraph font after a table. (One easy fix for this is to wrap the table in DIV tags - no attributes, just the bare naked tag itself will do the trick, in many cases.)
By using px units for font sizes, I assumed I was making it impossible (well, unlikely) for the browser to resize the font. Some layouts require this kind of control, and others can be very fluid, but I was working on a very tightly controlled layout.
Checking this kind of page in IE6 I disovered that IE6 WILL resize the default bullets in a <ul>, even though the font stays at a given pixel size.
This oddity means that the line-height changes to accomodate the bigger or smaller bullets, changing other relationships on the page, etc, etc.
The workaround is to use a custom bullet image:
ul {text-style-image:url(bullet.gif);}
Then the bullets stay the size you expect.
Trap: Not using the correct DOCTYPE could cause a browser to render your page incorrectly. And not using a DOCTYPE is not an option!!:)
For more information:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
To me, the point is to make intelligent use of the features of the browser that are available. There are instances where animatead gifs make sense - even a lot of them.
I would not even consider making a site without a guestbook. I find these (a) very reassuring, (b) useful as a "PR" device - reporting other's opinions of my content and pages and (c) I just like them.
Javascript and many of the other things that he mentions in the articles are useful when properly integrated with a page.
Even the "best viewed with" notes that the author objects to so violently have value - perhaps the page includes features that are indeed only workable in a particular browser. I personally would not bother as I like myh pages to work in all of the "big three", but others do not agree.
I guess my point is it is up to the webmaster (in concert with his business partners, of course) as to what's on the page and site.
A page and a site is designed to communicate something. If it does that communication well (even if it is just "buy this"), then the site has worked. If it does not communicate, for whatever reason, then the site does not work. It's really that simple.
Richard Lowe
Although these tips are "for professionals" they are so easy that "You don't have to be a professonal like myself to learn from these tips."
rmjvol