Get a free trial // Grow your CSS skills // Land your dream job

First-child in IE6

  • # October 30, 2008 at 10:08 am

    IE6 doesn’t support first-child. I’ve previously used this method to get around that, but now I want to do this:

    #footer ul li:first-child a {
    border-left: none;

    As far as I can tell, there’s no way to use the expression method to do this. If I write this…

    #footer ul li {border-left: expression…}

    …that will style the first <li> itself, not the <a> inside it. And if I write this…

    #footer ul li a {border-left: expression…}

    …that will style the first <a> inside every <li>.

    What I need to do is style every <a> inside the first <li>. Any way to get this working in IE?

    # November 4, 2008 at 8:11 am

    I’m not exactly sure what your problem is, but did think about using a CLASS?

    I often use menu’s like: | Home | Links | Contact |
    It took me a long time to figure out how to place the vertical lines.
    I now use something like:


    div#nav UL LI A {border-right: 1px solid #0000FF}
    div#nav UL LI A.first {border-left: 1px solid #0000FF}



    gr. Bert

    # November 5, 2008 at 4:18 am

    Just found a nice article about this:

    Gr. Bert

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed