I have a website where I’m using CSS boxes for the layout and also am using dynamic programming. I have a side menu which I have as a DIV Float box and then I have a DIV for the main content both of which are inside my Container DIV.
The probelm I am having is that the menu size changes dynamically according to who logs into the site and what section of the site they are on. I need the main content DIV to always be the same height as the Menu. IE7 does this automatically but Fire Fox doesnt. Nothing I try seems to cure the problem in both browsers. I’m new to CSS so maybe there is some other way I can do this or a property I can add onto my DIV’s.
This is how the PHP page is set up.
<body>
<div id=“container”>
<!-- start #header -->
<div id=“HeaderInPages”>
<?php include(“Header.php”); ?>
</div>
<div id=“mainContent”>
<!-- start #menuBar -->
<?php include(“Menu.php”); ?>
<!-- end #menuBar -->
<!-- ***** START BODY ***** -->
<P class=“headingsPage”>PUT TITLE HERE</P>
PUT BODY HERE
<!-- ***** END BODY ***** -->
</div>
<!-- end #container -->
<!-- start #footer -->
<div id=“footer”>
<p class=“footerText”></p>
</div>
<!-- end #footer -->
</div>
</body>
can anyone help? I think what I need is someone to make the container DIV always be at least the height of the menu bar that is imported using PHP and the menu bar is a float DIV.
I finally found a solution. I was missing a tag that makes it happen
<br class=“clearfloat” />
I wanted to post the solution so anyone else that had this problem and comes across this has it.
New code in PHP page
<body>
<div id=“container”>
<!-- start #header imported -->
<div id="HeaderInPages">
<?php include("Header.php"); ?>
</div>
<!-- end #header -->
<!-- start #mainContent -->
<div id="mainContent">
<!-- start #menuBar imported-->
<?php include("Menu.php"); ?>
<!-- end #menuBar -->
<!-- ***** START BODY ***** -->
<P class="headingsPage">PUT TITLE HERE</P>
PUT BODY HERE
<!-- ***** END BODY ***** -->
<br class="clearfloat" />
<!-- This clearing element is to force the content section to extend to the size of the floating menu -->
</div>
<!-- end #mainContent -->
<br class="clearfloat" />
<!-- This clearing element is to force the container DIV to extend to the size of the floating menu -->
<!-- start #footer -->
<div id="footer">
<p class="footerText"></p>
</div>
<!-- end #footer -->
</div>
<!-- end #container -->