The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to select this?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #46203

    [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


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


    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:


    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!


    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)
  • The forum ‘CSS’ is closed to new topics and replies.