Hi, I 've been trying to validate my CSS Style sheet using
<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a><!-- m -->
I keep getting the lots of the following warning:
Line : 2 font-family: You are encouraged to offer a generic family as a last alternative
etc...
I know its to do with the use of Generic fonts at the end of each font-family - but I'm not too sure
I can't seem to identify the areas in the code where I have to alter it...ANY HELP IS APPRECIATED
BELOW IS THE CODE:
body {margin: 5px; font-family: Arial, Helvetica, sans-serif; background-color: #FFFFFF;}
div#links A {color: white; text-decoration: none; font: Bold 12pt Arial;}
div#links A:hover {font: italic 12pt Arial;}
div#tabledesign {position: absolute; padding: 5px; top: 0px; left: 260px; font: bold 12pt Arial;}
/* used to display the links */
div#mission {position: absolute; top: 200px; left: 70px; width: 810px; text-align: center; font: bold 28pt monotype corsiva; color: silver;}
/* used to display the mission statement */
div#y {position: absolute; top: 290px; left: 630px; width: 300px; text-align: center; font: 12pt palatino linotype;}
/* used to display the signature "Group 01 Management" */
div#date {position: absolute; top: 5px; left: 10px; font: bold 12pt Bodoni MT;}
div#sign {position: absolute; top: 5px; right: 10px; font: bold 12pt Bodoni MT;}
div#phase {position: absolute; top: 200px; left: 50px; width: 300px; font: 13pt Arial;
color: black; text-decoration: underline;}
div#phasecontent {position: absolute; top: 230px; left: 60px; width: 700px; font: 12pt Arial;
color: black;}
div#members {position: absolute; top: 170px; left: 100px;}
div#progress {position: absolute; top: 150px; left: 75px;}
h3#jan {position: absolute; top: 125px; left: 415px;}
h3#feb {position: absolute; top: 200px; left: 335px;}
div#site {position: absolute; top: 130px; left: 270px;}Wherever you use a font attribute, like in:
div#links A {
color: white;
text-decoration: none;
font: Bold 12pt Arial;
}
you should use the generic font family like this:
div#links A {
color: white;
text-decoration: none;
font: bold 12pt Arial, Serif;
}
You did it in the first line, all you have to do is do it in the rest.The validator missed: 'Bodoni MT' and 'palatino linotype'
Single or double quotes around multi-word fonts
'pt' units for fonts are for printing not documents: <!-- m --><a class="postlink" href="http://www.w3.org/QA/Tips/font-sizefont">http://www.w3.org/QA/Tips/font-sizefont</a><!-- m -->: bold 12pt Arial, Serif; Hmm. Thanks for the info - it helped solve the problemOriginally posted by ray326
Hmm. Yes, I agree. Arial is sans-serif.However, its semi-irrelevant what you use as the generic just because the former are serif doesn't mean the generic must be serif and vice-versa - thought it fits more nicely.Originally posted by Robert Wellock
However, its semi-irrelevant what you use as the generic just because the former are serif doesn't mean the generic must be serif and vice-versa - thought it fits more nicely.
Yep, font-family: arial, "courier new", serif; is perfectly valid CSS, though probably ridiculous from a graphic design perspective. Sorry, I don't know the difference between serif and sans-serif...Originally posted by pyroclasm
Sorry, I don't know the difference between serif and sans-serif...
<!-- m --><a class="postlink" href="http://www.webopedia.com/TERM/s/serif.htmlThanks">http://www.webopedia.com/TERM/s/serif.htmlThanks</a><!-- m -->
<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a><!-- m -->
I keep getting the lots of the following warning:
Line : 2 font-family: You are encouraged to offer a generic family as a last alternative
etc...
I know its to do with the use of Generic fonts at the end of each font-family - but I'm not too sure
I can't seem to identify the areas in the code where I have to alter it...ANY HELP IS APPRECIATED
BELOW IS THE CODE:
body {margin: 5px; font-family: Arial, Helvetica, sans-serif; background-color: #FFFFFF;}
div#links A {color: white; text-decoration: none; font: Bold 12pt Arial;}
div#links A:hover {font: italic 12pt Arial;}
div#tabledesign {position: absolute; padding: 5px; top: 0px; left: 260px; font: bold 12pt Arial;}
/* used to display the links */
div#mission {position: absolute; top: 200px; left: 70px; width: 810px; text-align: center; font: bold 28pt monotype corsiva; color: silver;}
/* used to display the mission statement */
div#y {position: absolute; top: 290px; left: 630px; width: 300px; text-align: center; font: 12pt palatino linotype;}
/* used to display the signature "Group 01 Management" */
div#date {position: absolute; top: 5px; left: 10px; font: bold 12pt Bodoni MT;}
div#sign {position: absolute; top: 5px; right: 10px; font: bold 12pt Bodoni MT;}
div#phase {position: absolute; top: 200px; left: 50px; width: 300px; font: 13pt Arial;
color: black; text-decoration: underline;}
div#phasecontent {position: absolute; top: 230px; left: 60px; width: 700px; font: 12pt Arial;
color: black;}
div#members {position: absolute; top: 170px; left: 100px;}
div#progress {position: absolute; top: 150px; left: 75px;}
h3#jan {position: absolute; top: 125px; left: 415px;}
h3#feb {position: absolute; top: 200px; left: 335px;}
div#site {position: absolute; top: 130px; left: 270px;}Wherever you use a font attribute, like in:
div#links A {
color: white;
text-decoration: none;
font: Bold 12pt Arial;
}
you should use the generic font family like this:
div#links A {
color: white;
text-decoration: none;
font: bold 12pt Arial, Serif;
}
You did it in the first line, all you have to do is do it in the rest.The validator missed: 'Bodoni MT' and 'palatino linotype'
Single or double quotes around multi-word fonts
'pt' units for fonts are for printing not documents: <!-- m --><a class="postlink" href="http://www.w3.org/QA/Tips/font-sizefont">http://www.w3.org/QA/Tips/font-sizefont</a><!-- m -->: bold 12pt Arial, Serif; Hmm. Thanks for the info - it helped solve the problemOriginally posted by ray326
Hmm. Yes, I agree. Arial is sans-serif.However, its semi-irrelevant what you use as the generic just because the former are serif doesn't mean the generic must be serif and vice-versa - thought it fits more nicely.Originally posted by Robert Wellock
However, its semi-irrelevant what you use as the generic just because the former are serif doesn't mean the generic must be serif and vice-versa - thought it fits more nicely.
Yep, font-family: arial, "courier new", serif; is perfectly valid CSS, though probably ridiculous from a graphic design perspective. Sorry, I don't know the difference between serif and sans-serif...Originally posted by pyroclasm
Sorry, I don't know the difference between serif and sans-serif...
<!-- m --><a class="postlink" href="http://www.webopedia.com/TERM/s/serif.htmlThanks">http://www.webopedia.com/TERM/s/serif.htmlThanks</a><!-- m -->