The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

How to select this?

  • # July 8, 2013 at 9:10 am

    [This is my code]( “Link to code”)

    This is for a drop down menu.

    The inner ul li a’s have a border border bottom. How would I remove the bottom border from the last link?

    I’ve tried last-child and last child of type I’m using sass.

    Cheers guys

    # July 8, 2013 at 9:20 am

    I cant see any bottom border there. What you have there is text underline.

    # July 8, 2013 at 9:25 am

    A common mistake is applying last-child on the A and not the LI, perhaps you did that.

    Also, I would recommend to target first-child instead of last-child, for older browser support (older IE knows first-child but not last-child).

    This may be what you were after:

    # July 8, 2013 at 9:27 am

    I was just showing you the HTML not the CSS. I tried pasting in my SASS and Codepen didn’t like my indentation.

    I’ve figured it out now anyways having spent ages messing about.

    I just used first-child but applied the border to the li not the a if that makes any sense at all.

    Sorry just rushing around today trying to get stuff done.

    Thanks for your time man!

    # July 8, 2013 at 9:28 am

    Sorry Senff obviously replied before seeing your comment that was exactly the issue.

    Nesting is cool in sass but it can become hard to read if you’re not careful.

Viewing 5 posts - 1 through 5 (of 5 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