Welcome to WebmasterWorld Guest from 54.196.238.210

Forum Moderators: not2easy

Message Too Old, No Replies

Font-size not a value?

are percentages wrong?

     

royalelephant

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

10+ Year Member



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

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

10+ Year Member



Have you tried 'em'?

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

Hope this helps.

choster

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

WebmasterWorld Senior Member 10+ Year Member



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

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

10+ Year Member



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

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

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Did you fix it?

There must have been some other typo that affected it?

royalelephant

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

10+ Year Member



?

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...

 

Featured Threads

Hot Threads This Week

Hot Threads This Month