Recently, I read an article about em measurements instead of pixels for the type in CSS StyleSheets. So, thinking it would be simple enough, I set about changing all the type settings in my Golive CS StyleSheet. I used an easy conversion I read about - whereby you set the body of the text to 62.5%, then, say 10px equates to 1em..and 16px becomes 1.6em and so on. Well, as stated, this was quite easy taking me about 10 minutes to complete.
By the way, to set the Body Text Size to 62.5 percent (%), just type it in the ’size’ box in your style sheet for the Body Tag. See the image below:

However, once this process was complete and I reviewed all the pages in my site, I was baffeled to find that only a small number of my web site pages were displaying the type sizes correctly. The rest of the pages were showing the new ‘ems’ type settings at about double the size they should be. After searching the code on my pages for literally HOURS, and compared the code of the pages that DID work against the ones which didn’t, I noticed something odd.
The Docutype declaration on the pages that DID work was different. This was the Doctype displayed:
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
But the Docutype declaration on the pages that DID NOT work had the W3.org web address missing at the end, like this:
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
I’m no web -coding expert, so I don’t know why this error made my CSS StyleSheet stop working, but it did.I hope this article helps anyone who is having the same or similar problem that I did. So, if you are having problems troubleshooting text size on your stylesheet, I hope this helps. Please feel free to add any comments on this article or ask Questions.
>>Article by Andrew kelsall, Sqwink
Recent Comments