Forum Moderators: not2easy

Message Too Old, No Replies

Div height issues

         

eternal

10:54 am on Oct 1, 2005 (gmt 0)

10+ Year Member



Can some one tell me what is wrong with this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
div.main_container {
padding:0px;
margin:0px 10px 5px 10px;
border-top: 5px solid #CC6633;
border-bottom: 5px solid #CC6633;
border-left: 3px solid #CC6633;
border-right: 3px solid #CC6633;
background-color:#000000;
}
div.left_column {
width: 410px;
float:left;
}
div.right_column {
margin-left:410px;
}
</style>
</head>

<body>
<div class="main_container">
<div class="left_column">
<img src="images/title_fight.jpg" />
</div>
<div class="right_column">
<br /><br /><br /><br /><br />
</div>
</div>
</body>
</html>

I want the main div to contain both divs, how ever large they get vertically. And I want the two nested divs to expand vertically depending on their content.

Thanks for your time.

directrix

1:23 pm on Oct 1, 2005 (gmt 0)

10+ Year Member



Try adding a width to main_container.

eternal

5:42 pm on Oct 1, 2005 (gmt 0)

10+ Year Member



Excellent, that did the job but for some reason Mozilla is not applying the margin bottom to that div which sits in the MAIN container:

div.container {
width:760px;
background-color:#7A7A7A;
overflow:hidden;

eternal

5:43 pm on Oct 1, 2005 (gmt 0)

10+ Year Member



Sorry to confuse things but main_container is nested inside an over all container with the css [above].