Skip navigation
Currently Being Moderated

CSS validator having a problem with shorthand line-height

May 4, 2012 12:05 PM


Suddenly noticed a CSS error with a simple CSS:


h1 { font: 20px/100% "Times New Roman", Times, serif; }


"Value Error : font  / is not a font-family value :  20px / 100% "Times New Roman",Times,serif "



That's the way I've always written "font." And Dreamweaver agrees. Is there a new standard here?

  • Currently Being Moderated
    May 4, 2012 12:15 PM   in reply to MTKoan

    With CSS Shorthand on fonts, you should express ALL attributes.


    font: style | variant | weight | size/line-height | font-family "font name", "font name", font;


    If all attributes are not required, better to use font-size, line-height and font-family.




    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists

    Mark as:
  • Currently Being Moderated
    May 4, 2012 1:09 PM   in reply to MTKoan

    Jigsaw CSS validator isn't 100% perfect.  Could be a glitch in their system.  What matters most is how it performs in browsers.


    I only mentioned the issues around Font shorthand because some browsers/devices have trouble with it if you don't express all the attributes in correct sequence. 


    Nancy O.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points