One more:
---------------------
Option 4 - overflow: hidden instead of float on the second div
---------------------
<http://annevankesteren.nl/2005/03/clearing-floats>

Although you may need to set some form of width on the first for this to work.

On 4 November 2011 06:51, Russ Weakley <r...@maxdesign.com.au> wrote:
>>
>> Think of how two columns work in a table, when they have no specified width. 
>> They adjust to the size of the content and the available width, and wrap 
>> their content if the available width is reduced.
>>
>> This should be easy in CSS, no?
>
>
> The simple answer is that floats are not ideal in this situation.
>
> There are three ways you
> could solve this problem - but as Hassan mentions, they are best done without 
> using "float". All three solutions may present issues in older versions of 
> IE. Without knowing exactly what you are trying to achieve, it is hard to 
> recommend one of these solutions.
>
> ---------------------
> Option 1 - display: table, display: table-row, display: table-cell
> ---------------------
> <http://www.w3.org/TR/CSS2/visuren.html#display-prop>
>
> For example, you could make the two containers operate like table cells. I am 
> not really a fan of this approach, but it would give you the behaviour you 
> are looking for.
>
> <http://maxdesign.com.au/jobs/example-stevio/table.htm>
>
> ---------------------
> Option 2 - columns
> ---------------------
> <http://dev.w3.org/csswg/css3-multicol/>
>
> ---------------------
> Option 3 - Flexible Box
> ---------------------
> As Hassan mentioned, you could use the flexible box module as a solution
> <http://dev.w3.org/csswg/css3-flexbox/>
>
>
> Not sure if any of these help...
> Russ
>
>
>
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************
>
>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to