Two column layout, navigation div on the right, solution from previous thread didn't seem to work
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-03-11T16:48:27Z
Indexed on
2010/03/11
17:19 UTC
Read the original article
Hit count: 300
css
|css-layout
I tried the solution from this thread, but I must be missing something because it doesn't work:
<div style="float:left;margin-right:200px">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div style="float:right;width:200px">
<p>navigation</p>
</div>
It works when the text in the content div (the left one) is short, but when it's long then the div takes up the whole width of the browser and the margin is there, but the right div is pushed below the first one nevertheless.
What am I missing?
Edit: The goal is to have a fix sized navigation column on the right of the browser window and the left div should get all the space left by the right navigation column (liquid layout).
© Stack Overflow or respective owner