Forum Moderators: not2easy

Message Too Old, No Replies

getting horizontal divs to align against left vertical div

         

mattbyrnes

3:11 am on Sep 30, 2007 (gmt 0)

10+ Year Member



I have a nav in a div on the left that runs the length (height) of the page.

I have a list of items that I would like to run flush against the nav on the left, but if any of them runs the full width of the page, the entire item drops down to the bottom of the nav.

Take a look:

<no urls thanks>

How can i get them to line up properly flush against the nav on the left as well as span the entire width of the page?

[edited by: encyclo at 1:24 pm (utc) on Nov. 3, 2007]

Marshall

4:25 am on Sep 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey Matt.

The best thing would be to put all the right <div> in a wrapper that floats left. I have not looked at your CSS, but I think you can get the idea from below.

CSS /* I am just putting in the minimum to make the point */

#nav {
width: 200px;
height: 100% ;
float: left;
}

#rightwrapper {
width: 800px; /* use whatever width or designation works: em, % px */
height: 100%;
float: left;
text-align: left;
margin: 0;
margin-left: 10px; /* add to space content from nav OPTIONAL */
padding: 0;
}
.innerdiv {
width: 800px; /* optional */
}
HTML

<div id="nav"></div>
<div id="rightwrapper">
<div id="one" class="innerdiv">text text text </div>
<div id="two" class="innerdiv">text text text </div>
<div id="three" class="innerdiv">text text text </div>
<div id="four" class="innerdiv">text text text </div>
<div id="five" class="innerdiv">text text text </div>
<div id="six"class="innerdiv">text text text </div>
</div> <!-- end rightwrapper div -->

Marshall