homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Font-size not a value?
are percentages wrong?
royalelephant




msg:1190033
 1:48 pm on May 6, 2005 (gmt 0)

In my .css I have set my main body text font size to 100% and all other font sizes in proportion to it, like 87% or 120%. The W3C css validator doesn't like any of those percentages, tells me it's an error, and says they're not font-size values. How critical is this? Should I set my main body text to, say, 12pt or 12px, and leave the other percentages, or are percent values totally wrong?

 

Chpunka




msg:1190034
 1:57 pm on May 6, 2005 (gmt 0)

Have you tried 'em'?

Like font-size: .8em;
or , font-size: .9em;

Hope this helps.

choster




msg:1190035
 1:57 pm on May 6, 2005 (gmt 0)

Percentages are perfectly valid for font-size: [w3.org...]

Perhaps your syntax is off? It might help if you posted a snippet.

FWIW, 1.0em=100% so you can substitute ems for percents in most cases without serious issues.

Barbacena




msg:1190036
 4:37 pm on May 6, 2005 (gmt 0)

You could try using a descriptive size for the body text setting i.e. small, x-small etc. then make the other font sizes variants of that setting in EMS.

g1smd




msg:1190037
 10:30 pm on May 8, 2005 (gmt 0)

Did you fix it?

There must have been some other typo that affected it?

royalelephant




msg:1190038
 11:46 pm on May 9, 2005 (gmt 0)

?

i originally wrote a post explaining the source of my real trouble, but I guess I didn't click submit when i should have...

basically, it was a simple syntax problem that my tired eyes just didn't catch until syntax was metnioned... i am now doubly embarrassed, but i won[t bore you with anymore details...

please move on to the next thread... and my thanks to everyone who offfered some help...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved