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

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.

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

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed