Welcome to WebmasterWorld Guest from 54.211.238.44

Forum Moderators: not2easy

Message Too Old, No Replies

Font-size not a value?

are percentages wrong?

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

Junior Member

10+ Year Member

joined:Feb 4, 2003
posts:150
votes: 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?
1:57 pm on May 6, 2005 (gmt 0)

New User

10+ Year Member

joined:May 5, 2005
posts:5
votes: 0


Have you tried 'em'?

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

Hope this helps.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 17, 2001
posts:1262
votes: 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.

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

Junior Member

10+ Year Member

joined:May 6, 2005
posts:43
votes: 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.
10:30 pm on May 8, 2005 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


Did you fix it?

There must have been some other typo that affected it?

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

Junior Member

10+ Year Member

joined:Feb 4, 2003
posts:150
votes: 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...

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members