Treehouse: Grow your CSS skills. Land your dream job.

How do you remove Menu Nav last line divide?

  • # February 28, 2010 at 8:34 am

    Would someone be kind enough to help

    I have line divides in my nav menu between each button

    remove the last button line divide on the right side by writing a specific rule for the last menu item adding the the class tp the code below

    #menu a.level1, #menu span.level1 {
    background:url("../images/menu_level1_item.png") no-repeat scroll 100% 0 transparent;
    padding:3px 20px 0 18px;
    text-shadow:0 0 2px #646464;

    Many Thanks for your help and Kind Regards


    # February 28, 2010 at 2:21 pm

    Could you not use the :last-child pseudo-class for that?

    # February 28, 2010 at 11:17 pm

    I don’t know what your image looks like so I can’t be sure, but can you use border-right and style it the way you want and then use a class on the last child to remove the border? The :last-child pseudo class doesn’t work in IE7 I think.

    # March 1, 2010 at 5:21 am

    Actually I think :last-child works if you use:

    at the top of your IE docs :)

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

You must be logged in to reply to this topic.