SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    a fresh, new start... dujmovicv's Avatar
    Join Date
    Aug 2006
    Location
    Earth
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS valdation errors : level 2.1

    Hi ALL,

    I'm trying to CSS validate my site and I got a few errors mostly like :

    Code:
    Property text-shadow doesn't exist in CSS level 2.1 but exists in [css2, css3] : 0 1px #393939
    The text-shadow is displayed in all tested browsers (FF, Chrome, IE, Opera) but I'd really like my site to pass the CSS validation. How can I fix these errors?
    Another error is :
    Code:
    Unknown pseudo-element or pseudo-class :nth-child
    which is used to change the table row background color, here's the corresponding stylesheet line (Blueprint CSS framework) :

    Code CSS:
    tbody tr:nth-child(even) td, tbody tr.even td {background:#ffffff;}


    Any help will be highly appreciated.
    Regards

    Full time ADMIN - art community
    Part time coder - dsign

  2. #2
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Validate with options, and set the Profile to CSS3.

    text-shadow and :nth-child are not valid for CSS 2.1, so cannot be used if you wish to validate for that level.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,109
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by dujmovicv View Post
    I'd really like my site to pass the CSS validation.
    You are using some CSS3 there, so there's no way it will ever validate as CSS2. As Victorinox said, you can validate against CSS3 rules instead.

    Don't get too caught up on validation, though. It's just a guide to possible mistakes that might break your layouts, rather than a measure of your worth as a designer (or whatever). If, for example, you are using a few hacks for IE that don't validate, it's not a problem: the point is that you did this on purpose for a specific reason. Validation is for alerting you to things your weren't aware of.

  4. #4
    a fresh, new start... dujmovicv's Avatar
    Join Date
    Aug 2006
    Location
    Earth
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you guys for your replies! As always, your advice is highly appreciated!

    Full time ADMIN - art community
    Part time coder - dsign


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •