On 11/3/11 10:52 AM, Stevio wrote:
If I have two floats side by side, both are floated left as follow:.myfloat{ float:left; } and both contain text as follows: <div class="myfloat">Longer amount of text. Longer amount of text. Longer amount of text. Longer amount of text.</div> <div class="myfloat">Small amount of text.</div> Is there any way to prevent the second div from dropping below the first div when the viewport is narrowed, without specifying widths for either of the floats?
Other than ways already suggested, and assuming the shorter text fits on one line, try putting the small amount of text first in the markup, and floating that DIV only. You can apply a variety of styles to the longer text to get it to fit the remaining space without "float drop." It's a complex subject, but this page sums it up quite nicely, I think: http://www.css-101.org/block-formatting-contexts/index.php -- Cordially, David ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [email protected] *******************************************************************
