www.webdeveloper.com
Results 1 to 6 of 6

Thread: W3C Validator & :nth-child() Selector

  1. #1
    Join Date
    Jan 2011
    Posts
    5

    Question W3C Validator & :nth-child() Selector

    http://jigsaw.w3.org/css-validator/v...ning=1&lang=en

    I am using Pluprint's typography.css and this gives me an error message. Bacause there is jQuery's nth-child selector.
    Please someone help me ...

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    That pseudo class :nth-child() is a CSS selector. It has nothing to do with JQuery.The selector has the syntax
    Code:
    :nth-child(an+b)
    Where a and b should be integers
    That means it accepts only a formula as argument.

    Or your code looks like:
    Code:
    tbody tr:nth-child(even) td
    Which, obviously, is an error. If you want an evenly match (a zebra), probably it should be:
    Code:
    tbody tr:nth-child(2n+1) td
    You have misunderstood some confusing explanation about the :nth-child() used in JQuery. In fact, you are dealing now with a CSS problem. JQuery is a JavaScript library. It has nothing to do with the CSS validation.
    Last edited by Kor; 01-11-2011 at 03:30 AM.

  3. #3
    Join Date
    Jan 2011
    Posts
    5
    Thanks for respond. I have edited, but still error message

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by insanoff View Post
    Thanks for respond. I have edited, but still error message
    Post the code. Or the link. Or the validator's link.

  5. #5
    Join Date
    Jan 2011
    Posts
    5
    avantajbul.com

  6. #6
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    nth-child is a CSS 3 feature. You'll need to expand the validator's options and change the profile to CSS level 3.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles