views:

88

answers:

3

Hello... I'm tired to work with this divs :(. Here is my problem: I have 2 divs:

<div id="content">
  <div id="row_left"></div>
  <div id="row_middle"></div>
  <div id="row_right"></div>
</div>
<div id="bottom"></div>

css:

#content
{
  overflow: hidden; width: 100%;
}

Content-div is including another 3 divs, which should stay horizontally.

#row_left, #row_middle, #row_rifht { float: left; width: 33%; }

The trouble is that bottom div doesn't stay refer to content-text. It's always on the same position, even when content-rows text is over. How can i repair it?

+1  A: 

Try adding a div after content with the style:

clear: both; line-height: 0.1em;

And put an

&nbsp;

in it

ck
Thanks, it's that, what i need.
Ockonal
Rippo's answer is more correct... just add "clear: both" to the bottom div as long as the bottom div has content in it.
kmiyashiro
Thanks! I suppose it depends on what the author likes!
Rippo
+2  A: 

Try

...
<div id="bottom" style='clear:both'></div>
Rippo
+1  A: 

If you'd like to clear the floats without adding extra markup, put this in your CSS:

#content { zoom: 1; }
#content:after {
    clear: both;
    display: block;
    content: ".";
    height: 0;
    visibility: hidden;
}
cpharmston