1 reply [Last post]
naijatexanstud
Offline
Regular
Last seen: 16 years 29 weeks ago
Joined: 2003-09-12
Posts: 13
Points: 0

So, I'm trying to get the hang of these em units. I had specified that a class called bodytxt would have a font-size of 0.7em, and on one page everything looked great, but then on another page where it was using the same class everything was nasty small. I didn't write this, but what had happened was that a table was declared with that class, and then a table cell was declared with that class, so I'm guessing it declares everything to be 0.7 em, and then the next time it was called the text was 0.7em of that, right?

Right now, we have no base font-size specified in the body tag in our stylesheet. Should we just make it 100% or what?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

.7em of .7em might not be pretty!

best to declare it in the body but downsize it to something like 76%
these links explain one take on percentage sizes to use and the problem with nested elements inheriting the parent element size thus becoming a percentage of a percentage, ergo too small which is a pain!
http://www.clagnut.com/blog/348/

http://www.thenoodleincident.com/tutorials/typography/

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me