Previous Message
Next Message

nowrap for floats?

Sent by Stephen Johnson on 1 November 2004 13:01


Tim Sheiner wrote:

> 

> Is there any way to prevent floated objects from wrapping as the 

> browser window is reduced in width?

>

 

Yes.  Use a containing div with a fixed width.

 

<div class="containingBox">

<div class="float">float 1</div>

<div class="float">float 2</div>

<div class="float">float 3</div>

<div class="float">float 4</div>

 

</div>

 

 

..containingBox {

width: 400px;

height: 1%;

}           

 

..float {

float: left;

width: 75px;

height: 75px;

background-color: #3AA;

border: 1px solid #000;

}

 

Stephen Johnson

Columbia, SC

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: