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

Div Width Issue

  • # December 24, 2012 at 4:18 pm

    My post views are in a div id called #postviews. Unfortunately, the width is being set to the width of its container, #content, rather than the size of the text inside #postviews.

    Any easy fix for this? I feel like this is an easy solution and I’m completely missing the answer.

    An example: []( “”)

    Here is my CSS for post views

    #postviews {

    # December 24, 2012 at 5:09 pm

    This reply has been reported for inappropriate content.

    add display:inline-block and it will be as wide as the content inside

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