PDA

View Full Version : Lining Up Div's




monke
Nov 5, 2006, 04:57 PM
Here's what I have for coding so far:

Page:
<div id="div1">
<div id="div2"></div>
<div id="div3"></div>
</div>
CSS Document:
#div1 {
height: 428px;
width: 752px;
margin-top: 36px;
margin-left: auto;
margin-right: auto;
}
#div2 {
height: 428px;
width: 319px;
}
#div3 {
height: 428px;
width: 319px;
}

Is there a way to line up div's #2 and #3 beside each other?
Like this horrible drawing I have made :p : 61457
Or would I have to use tables in order to do it?

Thanks



nightelf
Nov 5, 2006, 05:23 PM
I'm not very good at CSS positioning, etc but I think you can do something like this

<div class="1">
<div class="3"></div>
<div class="2"></div>
</div>

and have div.3 float to the right.

I usually use tables for structure and css for presentation.

monke
Nov 5, 2006, 05:29 PM
Yes, thanks once again nightelf, that's the only speed bump I've hit in a while. Finally I'm starting to get used to this CSS stuff. :)