Forums

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
    Posts
  • #46203
    Ricky55
    Member

    [This is my code](http://cdpn.io/fgHjJ “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

    #141897
    CodeGraphics
    Participant

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

    #141899
    Senff
    Participant

    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: http://codepen.io/senff/pen/akftq

    #141901
    Ricky55
    Member

    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!

    #141902
    Ricky55
    Member

    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.