CSS: div text wrap around floated div

Posted by Thildemar on Stack Overflow See other posts from Stack Overflow or by Thildemar
Published on 2010-04-30T05:10:06Z Indexed on 2010/04/30 5:17 UTC
Read the original article Hit count: 308

Filed under:

I am trying to create a site that has a fixed width content div and a floating div in the blank space on the right of the page, like so:

<html>
<div style="width:150px;float:right;border:thin black solid">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</div>

<div style="width:400px">


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 


Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
</div>

</html>

This works fine, but when the page is re sized too small either the left div jumps down or the text within it does not start wrapping around the right div until its about halfway through it.

I would like the test within the left div to wrap around the float is the page width is too small.

What am I missing??

© Stack Overflow or respective owner

Related posts about css