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

Floating divs, with no set width

  • # August 24, 2009 at 6:08 am

    To begin with, since I’m fairly a newbie, I do hope that this question is easy to answer for more experienced designers.
    I have tried to search for a solution, but my english is not very strong, so I’m not quite sure how to express myself in short sentences when searching.

    Anyhow, I’m designing a theme for wordpress for a friend, and I want to have the standard sidebar on the right side, as usual.
    But I want the post to expand below the sidebar, so that it won’t be any white space below the sidebar.
    I’m floating the post-div to the left, and the sidebar to the right. I’ve also set the get_sidebar function before the post-loop runs.
    But it seems that when the posts have no set width they won’t fit at the same place where the sidebar is.
    And if I set width to the post-div so that it’ll fit beside the sidebar the white space below the sidebar will still be there.
    How to I get pass this problem?

    A visually example of how I want it to be:
    or at least like this:

    The live example:

    # August 24, 2009 at 7:09 am

    This reply has been reported for inappropriate content.

    Take the float off and change, div.full-date and to clear:left instead of clear:both. Lastly, change div.datebox to clear:left instead of float:left.

    # August 24, 2009 at 12:21 pm

    Thank you, for your quick reply :)

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