I am facing an issue with dynamically resizing the height of my sidebar div to match the content div. Despite setting no specific height, it seems to adjust its height according to the content rather than using the parent div's height as I expected.
You can observe this issue on "baradineholdings.com.au" (please reserve your judgment on the site, as I am a newbie and focusing on getting the basics right before making it visually appealing).
The home page appears fine due to lack of content. However, if you navigate to the about page, you will see the problem. It seems like in the case of the main page, the content div is dictating the height of the sidebar div, but I cannot figure out why.
HTML:
<body>
<div id="wrapper">
<?php include('includes/header.php'); ?>
<div id="internal">
<div id="sidebar">
<h3>Navigation</h3>
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About</a></li>
<li><a href="gallery.php">Gallery</a></li>
<li><a href="contact.php">Contact</a></li>
</div> <!-- end #sidebar -->
<div id="content">
<p>Images Coming Soon!</p>
<p>Please see the about page for more information.</p>
</div> <!-- end #content -->
</div> <!-- end #internal -->
<?php include('includes/footer.php'); ?>
</div> <!-- end #wrapper -->
</body>
CSS:
body {
background-color: #f1f1f1;
font-family: georgia,sans-serif;
color: #333;
margin: 0;
padding: 0;
}
#wrapper {
width: 960px;
background-color: #f1f1f1;
margin: 0 auto;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
#internal
{
width: 959px;
height: auto;
background-color: #f1f1f1;
margin: 0 auto;
border-right: 1px solid #ccc;
}
#content {
width: 675px;
height: auto;
float: left;
padding: 10px;
}
#sidebar {
width: 150px;
/* height: 410px; */
float: left;
background-color: #27408B;
color: white;
}
#sidebar a {
text-decoration: none;
color: white;
}
#sidebar li {
list-style: none;
}
As mentioned, I am new to this, so I might be missing something obvious... I attempted using jsfiddle, but even when adding a substantial amount of content to the about page, it displayed small and did not impact the sidebar... The issue persists across Chrome and IE browsers.