Mobile app version of vmapp.org
Login or Join
Pierce454

: Why The W3C CSS Validation Service is showing Value Error : font / is not a font-family value : 11px / 14px "Trebuchet MS",sans-serif I tried to validate my css code using W3C tidy and the

@Pierce454

Posted in: #Css #Fonts

I tried to validate my css code using W3C tidy and the w3c website is showing me the error that


Value Error : font / is not a font-family value : 11px / 14px
"Trebuchet MS",sans-serif


So what's wrong with it, earlier it was not a code error, I even copied some similar code from professional blogger and tried to validated it in w3c but still I'm getting this error?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Pierce454

2 Comments

Sorted by latest first Latest Oldest Best

 

@Margaret670

This seems to be a bug that just crept in into the W3C CSS Validator. It has been reported on the validator’s discussion list: lists.w3.org/Archives/Public/www-validator-css/2012May/0003.html
Recently, there have been bugs especially in font-related CSS rules in the validator, since its code has been renewed and some cases were not dealt with properly. My guess is that it takes a couple of weeks to get this fixed.

You can avoid triggering the bug if you do not use the font shorthand but specify properties separately:

font-size: 11px;
line-height: 14px;
font-family: "Trebuchet MS", sans-serif;

10% popularity Vote Up Vote Down


 

@Radia820

It looks like you're trying to validate a CSS3 property in a CSS2 validator. Switch the validator profile to CSS level 3 and you'll be good.

Based on what you've said in the comments and the fact that htmlhelp.com/tools/csscheck passes it, as does my local software, I'm calling bug in the validator. W3C isn't perfect and bugs do creep in from time to time.

Your code is fine so I would just ignore it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme