I have a two column layout in which I have a static width for the right column of 350px, and for the left column the width should be such that it fills the rest of the page. Or at least that is what I want to happen, but unfortunately it's not.
Here's a look at my css/html: http://jsfiddle.net/CmJ7P/. Any help you could offer on how to make this happen would be greatly appreciated.
Edit: I'd prefer a solution in IE6 if you can
You need to remove the float from the left column and put the right floated column first in the HTML:
.wrapper {
display: block;
}
.wrapper div.content {
background-color: #ccc;
}
.wrapper div.sidebar {
display: block;
background-color: blue;
float: right;
width: 320px;
height: 400px;
padding: 0 20px;
}
html, body {
padding: 0;
margin: 0;
}
<div class="wrapper">
<div class="sidebar" style="width: 350px">
<div style="margin-top: 15px;">
</div>
<div class="sidebarpanel">
</div>
<div class="sidebarpanel">
</div>
<div class="sidebarpanel">
</div>
</div>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sed elementum libero. Morbi aliquam, nunc a ullamcorper eleifend, dui ante cursus odio, ac lacinia arcu neque vitae dui. In et ipsum orci. Donec laoreet imperdiet augue non sodales.
Phasellus vel elit sit amet est mattis euismod. Duis non turpis eget ligula gravida mattis eget vitae turpis. Nunc vulputate lacinia posuere. Quisque nec feugiat quam. Praesent facilisis pulvinar tortor, sit amet fringilla nisl imperdiet at. In
pulvinar dignissim dignissim.
</p>
</div>
</div>