|
Praveen, thanks a lot for your response. I really appreciate it. Now, let's say I want to add a second/third/etc box to the left and right columns. In order for the boxes to stack properly, I need to add a clear to the left/right classes in the css. This works except you'll notice that the boxes in the right column are now shifted downwards on the page. The 'right' box only starts after where the 'left' box ends. I know I could avoid this by just putting everything within one div, but I need the boxes to be seperate for dynamic content. Here is the modified code for example:
/*CSS*/
#container {
width: 90%;
margin-left: auto;
margin-right: auto;
color: #333;
border: 1px solid #000000;
line-height: 130%;
padding: 1px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
background-color: #FFFFFF;
}
#left {float: left;
clear: left;
width: 180px;
margin: 0;
padding: 0em;
border-right: 1px solid gray;
}
#right {float: right;
clear: right;
width: 190px;
margin: 0;
border-left: 1px solid #000000;
}
#content {margin-left: 180px;
margin-right: 190px;
padding: 1em;
}
/* If u want the footer, add the below */
#footer {clear: both;
margin: 0;
padding: .5em;
color: #333;
border-top: 1px solid gray;
}
/* end CSS */
/* HTML */
<html>
<body>
<div id="container">
<div id="left">left</div>
<div id="left">secondleft</div>
<div id ="right">right</div>
<div id ="right">secondright</div>
<div id="content">content</div>
/*optional footer */
<div id="footer">footer</div>
</div>
</body>
</html>
Thanks again for your help!
|