Results 1 to 3 of 3

Thread: nesting pseudo classes?

  1. #1
    Join Date
    Mar 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default nesting pseudo classes?

    Hi All,

    Is there a way to nest pseudo classes?

    I'm trying to create a mega-breadcrumb like in the walmart site:

    http://www.walmart.com/cp/For-the-Home/4044

    I'm styling the "all departments" link differently using

    li:first-child but now I want to add a hover to it to display the dropdown.

    But li:first-child:hover doesn't work. (didn't think it would)

    Thanks,
    J

    So is there a way to do this using only pseudo classes, or do I have to create a class or ID to replace :first-child?

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    According to this article: http://css-tricks.com/pseudo-class-selectors/ you can chain them. The example used is p:first-child:first-letter

    What browser have you tested that in? Some browsers (i.e. IE) only support hovers on anchor tags.

  3. #3
    Join Date
    Mar 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    According to this article: http://css-tricks.com/pseudo-class-selectors/ you can chain them. The example used is p:first-child:first-letter

    What browser have you tested that in? Some browsers (i.e. IE) only support hovers on anchor tags.
    Thanks for the tip. I develop in Firefox and when it didn't work there I assumed I couldn't do it. Maybe if I swapped them li:hover:first-child.

    And IE6 is the only browser that doesn't support hover on other tags besides <a>.

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
  •