Grow your CSS skills. Land your dream job.

last-child of a class

  • # May 27, 2012 at 1:26 am

    http://demo.elcaminorealfutbol.org/our-board/

    How would I apply the last-child rule to the last container to not show the bottom border?
    I tried:
    .member-holder:last-child {
    border-bottom: none;
    }

    # May 27, 2012 at 2:36 am

    I ditched the clear class and used overflow:hidden instead, which answered my question.

    # May 28, 2012 at 9:26 am

    border-bottom: 0; (or even none) should work fine.

    sometimes :last-child might not be selecting the “last child” as you expect it to, so you might want to check out :last-of-type

    Cheers

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".