W3C CSS Validation Question?

liunx

Guest
In an attempt to validate my stylesheet, I received the following errors. Can someone expound on what I need to do to correct these errors?

Line: 0 Context : #nav ul
Invalid number : fonttoo few values for the property font : bold

Line: 0 Context : #footer
Invalid number : fonttoo few values for the property 11px : 11px

Warnings
Line : 0 font-family: You are encouraged to offer a generic family as a last alternative

These are the 2 div id's in question. BTW, I'm using Verdana as the main font throughout, but nowhere have I specified a font-size 11px or bold ???

#nav ul {
margin : 0;
list-style : none;
}

#footer {
clear : both;
width : 100%;
margin-top : 1em;
text-align : center;
}Can we see the rest of the CSS? I went and validated the CSS you provided, and it generated no errors....I got it to validate... I basically had 2 syntax errors in defining the "font", but I still get a Warning:

Line : 0 font-family: You are encouraged to offer a generic family as a last alternative

How do I "offer something other than a generic family"?
My font-family in the css is:

body {font-family: Verdana, Tahoma, Arial}body {font-family: Verdana, Tahoma, Arial, sans-serif}

I always have problems with that, so I usually specify sans-serif as the last (I believe every system has sans-serif, but I could be wrong — very, very wrong).sans-serif, that's it? REALLY?


yep, validated straight up...
That was easy...

THANX!Originally posted by CyCo
sans-serif, that's it? REALLY?


yep, validated straight up...
That was easy...

THANX!
Lol, yup. Glad to help. ;)Originally posted by Paul Jr
(I believe every system has sans-serif, but I could be wrong — very, very wrong).

"Sans-serif" is not a font name, it is a generic font name. This means that if the user does not have one of Arial, Verdana, or Tahoma on his computer, the default font that he does have in the sans-serif (smoother) font family will be displayed. This could be, for example, MS Sans Serif. It is a different font displayed in the place of the sans-serif generic font name. You can modify these settings in your browser -- I have mine set to Arial.Originally posted by Jona
"Sans-serif" is not a font name, it is a generic font name. This means that if the user does not have one of Arial, Verdana, or Tahoma on his computer, the default font that he does have in the sans-serif (smoother) font family will be displayed. This could be, for example, MS Sans Serif. It is a different font displayed in the place of the sans-serif generic font name. You can modify these settings in your browser -- I have mine set to Arial.
Ahh, thanks. ;)
I believe mine is set to Times New Roman, or maybe Palatino Linotype…Originally posted by Paul Jr
I believe mine is set to Times New Roman, or maybe Palatino Linotype…

That'd probably be your serif generic font family. Times New Roman and Palatino Linotype (I believe) are serif fonts. Though, you can set the sans-serif generic font family to a serif typeface...OK, let's say the user does not have Verdana, Tahoma or Arial fonts. Will sans-serif suffice as the last listing for the font?
The validator didn't flinch, so, I'm assuming it would be correct.
Yes?Originally posted by CyCo
OK, let's say the user does not have Verdana, Tahoma or Arial fonts. Will sans-serif suffice as the last listing for the font?
The validator didn't flinch, so, I'm assuming it would be correct.
Yes?

That's correct; whatever font the user has set to correspond with the generic sans-serif font family will appear.Thanx!

CheersFurther information (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families">http://www.w3.org/TR/REC-CSS2/fonts.htm ... t-families</a><!-- m -->)... in case you're interested.Originally posted by Jona
That'd probably be your serif generic font family. Times New Roman and Palatino Linotype (I believe) are serif fonts. Though, you can set the sans-serif generic font family to a serif typeface...
Wow, now you lost me.Why do people define multiple font-families?

I usually only use one and that's Verdana.Originally posted by BuezaWebDev
Why do people define multiple font-families?

I usually only use one and that's Verdana.
Because some people want to use a specific font family, and since some people may not have that font, they supply different font families that look similiar, but are most likely more common.Awesome. :) Thanks for the quick reply. :)because they want to have a certain look to the site if the user has the certain font. If the user does not have the font then they define a secondary one so that they still have some control over the way it appears. and at the very end they define a generic font so that they still have a tad control if all else fails :P it helps u know what everyone else is viewingOriginally posted by BuezaWebDev
Awesome. :) Thanks for the quick reply. :)
No problem. The replies are so quick because I am omnipresent. :DRemember, the majority of your page is text. You want that text to look as spiffy as possible, right? :DWhat are your favourite popular fonts? :DI totally dig Palatino Linotype, Bookman Old Style (only for text; too much pixelation with increased font size), Garamond (just got that from Omega; cool font), Times New Roman, Sylfaen, and… I think that’s it.I like Eurostile... it's a font no-one has that totally pwns.

AARGH! It won't let me attach font files or a zip with the two fonts... so I'll just link to the dir. Take what you want.

<!-- m --><a class="postlink" href="http://141.154.68.252:81/test/fonts/">http://141.154.68.252:81/test/fonts/</a><!-- m -->
 
Back
Top