Grow your CSS skills. Land your dream job.

List extend further than contain element

  • # April 1, 2013 at 4:11 pm

    Why is the list item extending further than the containing box on this codepen.

    http://codepen.io/KevinEsther/full/qEkGL

    # April 1, 2013 at 8:10 pm

    it’s because of the negative margin on the li. I’d change them from display: inline-block to float: left and remove the margin. you should also clear the border from the last anchor

    # April 2, 2013 at 5:19 am

    Thanks. I have went with the float option like to use display inline-block however not easy when using lists. Removed the border. Any feedback on how I could improve?

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".