#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    5
    Rep Power
    0

    CSS validation error "Redefinition of font-weight "


    Hello,

    On validating my CSS file, there are two error messages:

    Line : 81 Level : 2 Redefinition of font-weight : .headertext
    Line : 107 Level : 2 Redefinition of font-weight : .menutext

    .headertext and .menutext are two styles within my CSS which are written like this:

    .headertext {
    font : 0.7em/2.3em verdana, arial, helvetica, sans-serif;
    font-weight : 600;
    text-align: right;
    }

    .menutext {
    font: 0.7em verdana, arial, helvetica, sans-serif;
    font-weight : 600;
    }

    The headertext and menutext both appear between different <div> tags.

    I can't find what "Redefinition of font-weight" means - can someone help?

    Pendle
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    USA
    Posts
    830
    Rep Power
    14
    I think it is considering you as having set the font-weight first with the font shorthand property and then again with the font-weight property. Anyway, it's just a warning, not an error, right?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    5
    Rep Power
    0
    Yes, it is just a warning.

    How has the weight been set with the Font property? I understood the 0.7em/2.3em bit to be the font height and the line height?

    Without the font-weight property I lose the bold effect.


    Pendle
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    20
    Which validator did you use?
    I got not warnings when using the W3C CSS Validator
    http://jigsaw.w3.org/css-validator/validator-text.html
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    5
    Rep Power
    0
    I used this one:

    http://jigsaw.w3.org/css-validator/v...or-upload.html


    I think I've figured it out now, on the samples which I'd posted, I'd specified the line-height and font-size using the font property, on items in the CSS I'd specified line-height and font-size separately.

    I did this with the headertext and menutext and its validated without the warnings now.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo