div Inside Of div

liunx

Guest
Is it ok to use a <div> inside of a <div>? I'm trying to layout my page with a column on the left but don't know how to do it the way I want without embeding div's. The only way I can think of is:<br />
<br />
<br />
<div style="height:30px">Header</div><br />
<div><br />
<div style="float:left;width:200px;height:100px">Side</div><br />
<div style="width:100%;height:100px">Body</div><br />
</div><br />
<div style="height:20px">Footer</div><br />
<br />
<br />
The reason it has to be inside of a div tag is so that I can have a border on the side that will run all the way to the bottom. This way the height of the side has to be the same as the body. Basicly I need it to do the same thing as:<br />
<br />
<br />
<table><br />
<tr><br />
<td height="30" colspan="2">Header</td><br />
</tr><br />
<tr><br />
<td width="200">Side</td><br />
<td>Body</td><br />
</tr><br />
<tr><br />
<td height="20" colspan="2">Footer</td><br />
</tr><br />
</table><br />
<br />
<br />
Below is the result I'm trying to get using div's and CSS. Thanks<br />
<br />
<br />
-----------------------<br />
| |<br />
-----------------------<br />
| | |<br />
| | |<br />
| | |<br />
| | |<br />
| | |<br />
-----------------------<br />
| |<br />
-----------------------<!--content-->Neting divs is perfectly allright....<!--content-->Cool, thanks.<!--content-->
 
Back
Top