Question
Im trying to get a div to auto adjust to the height of the div to its right.
You can see an example here www.littledesignplanet.co.uk/lloyd The white space div on the left i set the height manually.
Is there a way to get this to automatically stick to the same size as the main content div? As each page is going to be a different height.
Thanks, Sav
Solution
Hmm... Why don't you just set the margin-left
of #content
to 400px? This would yield the same result but in a much simpler way.
Cheers :)
Update: if you want to make both columns equal height, there is several of techniques for this. My favourite is this one:
<div class="container">
<div id="whitespace">Lorem ipsum</div>
<div id="content">Foo<br />bar</div>
</div>
<style type="text/css">
.container {overflow: hidden;}
#whitespace, #content {padding-bottom: 32767px;margin-bottom: -32767px;}
</style>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow