Forum Moderators: not2easy

Message Too Old, No Replies

DIV sizing with floats

         

0sync0

6:55 pm on Feb 20, 2008 (gmt 0)

10+ Year Member



I want to line up three DIVs horizontally using floats. The first two are fixed width. I need the third DIV to go to the edge of the browser. Floated DIVs have to have a size so I can't figure out how to handle the third DIV.

tkadlec

6:32 pm on Feb 21, 2008 (gmt 0)

10+ Year Member



If you don't float the third, you can get them all to line up simply by using a margin on the non-floated DIV.

Ex:
.one{
float: left;
width: 200px;
}
.two{
float:left;
width:220px;
}
.three{
margin-left: 440px;
}

<div class="one">
</div>
<div class="two">
</div>
<div class="three">
</div>

Tim

[edited by: SuzyUK at 6:59 pm (utc) on Feb. 21, 2008]
[edit reason] No signatures, per TOS, thanks [/edit]