Need Help: My sidebar won't expand in height when I update content. Is there a way to make it adjust using just HTML and CSS?
html code:
<div id="main">
<section>
More text goes here...
</section>
<div id="sidebar">
Additional text here...
</div>
</div>
<footer>
Copyright © domain.com 2014
</footer>
css code:
#main{
background: #ffffff;
width: 60%;
margin: auto;
padding: 20px;
position:relative;
}
section{
width: 75%;
margin: 40px 0;
padding: 0;
line-height: 1.5em;
min-height: 100px;
}
#sidebar{
width:150px;
position: absolute;
margin: 60px 0 0 10px;
padding: 0 20px 0 20px;
right:0;
bottom:0;
top:0;
line-height: 1.5em;
}
footer{
width: 60%;
background-color: #700505;
text-align: center;
padding: 20px;
padding-top: 10px;
padding-bottom: 10px;
margin: auto;
margin-bottom: 20px;
color: #ffffff;
}
I realize that there might be unnecessary properties included...
UPDATE: Added the footer, hoping this resolves the issue. You will need to add numerous lines to trigger an overlap with the footer during testing.