You can view your first fiddle, but upgrade to work according to your specification, here: http://jsfiddle.net/ramsesoriginal/Ln49F/12/
This works by pointing the right edge on the second div and just leaving the width on the auto.
HTML does not change:
<div class="container"> <div class="menu">Menu to the left</div> <div class="content">Content of site<br>x<br><br><br><br><br></div> </div>
And CSS is very similar to yours:
div.container{ width: 90%; height: 150px; background: red; } div.menu{ width: 150px; height: 100px; float: left; background: blue; } div.content{ margin-left: 150px; background: green; }
I removed the width: 100%;
from div.content
and replaced it with margin-left: 150px;
As you can see, you are almost right!
EDIT: BONUS: (fake) Columns with the same height!
I updated the script with some code to create faux columns "with CSS3 so that it looks like both divs expand to the bottom of the container. You can see it here: http://jsfiddle.net/ramsesoriginal/Ln49F/ 13 / I do not know if you really need it, but this is a general requirement for such scenarios.
I just placed the gradient background on the container with one hard stop in the middle:
background: linear-gradient(left, blue 150px, green 150px);
And then I expanded this with various vendor prefixes:
background: -moz-linear-gradient(left, blue 150px, green 150px); background: -webkit-gradient(linear, left top, right top, color-stop(150px,blue), color-stop(150px,green)); background: -webkit-linear-gradient(left, blue 150px, green 150px); background: -o-linear-gradient(left, blue 150px, green 150px); background: -ms-linear-gradient(left, blue 150px, green 150px); background: linear-gradient(left, blue 150px, green 150px);
I don’t know if you need it, but sometimes it can be very useful!