Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Making a parent <body> strech to cover its children

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23781
    taxali
    Member

    Hey, i know the title of this post is whack but bear with me.

    So i have a <body> styled in the center of my page (around 700 px wide) with a plain white background (grey for demonstration). I positioned it as relative so that I can position its two children (a main-col and a sidebar) with absolute positioning relative to it. Like this :arrow:

    [img]http://img408.imageshack.us/img408/146/wantei7.th.jpg[/img]

    Unfortunatly, since there is nothing in the body and the sidebar and main-col are taken out of the flow of things, the body gets bumped up, so i get this instead.

    [img]http://img266.imageshack.us/img266/3885/getkj5.th.jpg[/img]

    Now, i know I can use floats to achieve the same thing and then just clear ’em to bump the body down, but heres the thing. I wanted to add ANOTHER sidebar (sidebarB) to the sidebar (using absolute pos. to hang it to the right). Like this :arrow:

    [img]http://img134.imageshack.us/img134/5039/sidebar2iv0.th.jpg[/img]

    What would be the best, most valid way to position the second sidebar? Do i position it relative to the body or to the original sidebar?

    Sorry about the noob-ness of this question. Take care :)

    #52193
    taxali
    Member

    donzo. min-width is what i was looking for. probably many solutions to this but urs seems very valid and cool. thanks mate

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.