Forum Moderators: not2easy

Message Too Old, No Replies

Div coverage issues

Cant get div to cover all child divs

         

jordban

8:04 am on Dec 30, 2004 (gmt 0)

10+ Year Member



Hello,
I have a div called wrapper and inside of it are 3 different divs. Using fuax columns i have set it up so the background shows up nicely but i cant seem to get the wrapper div to cover all the child divs unless i add something like float:left (but i dont want it to float left).

<div id='wrapper'>
<div id='left'>hi</div>
<div id='content'>hi</div>
<div id='right'>hi</div>
</div>

What can i do to make sure wrapper actually wraps around the child divs?

BonRouge

8:15 am on Dec 30, 2004 (gmt 0)

10+ Year Member



I'm guessing left and right are floated. If so, you'll need to clear them by adding a clearing div just before you close your wrapper div. Something like this:

HTML


<div class="clear">/div>

CSS


.clear {
clear:both;
height:1px;
margin-top:1px;
overflow:hidden;
}

If that's not the case, then you might need :

CSS


#wrapper {position:relative}

I hope this helps.

jordban

6:55 pm on Dec 31, 2004 (gmt 0)

10+ Year Member



thanks a lot, it worked like a charm!