Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Height issue

Status
Not open for further replies.

irbk

MIS
Oct 20, 2004
578
US
On my web page I have a structure roughly like this (just sort of psudo coded for example)
Code:
<div content>
  <div left-menu style=float:left; width:200px;>
     left menu stuff here
  </div left-menu>
  <div welcome>
     welcome stuff here
  </div welcome>
  <div item style=flowat:left; width:250px;>
     <div title>
       item stuff here
     </div title>
     <div image>
       Image stuff here
     </div image>
   </div item>
</div content>

The amount of "item" div's is dynamic and pulled from a database. What I'm trying to do is get the left-menu div to be 100% of the size of the content div, but I can't figure out how to do it. What ends up happening is my items will be where they are supposed to be until they get to the bottom of the left-menu div and then they start wraping under the left-menu div. Regardless of what I put for the height of div left-menu, the items will keep wraping under. Any suggestions?

Thanks in advance.
 
Hard to guess what exactly you're doing, but given the small sizes, I would guess that you're putting many columns side by side. This way when you run out of space, columns appear beneath and when the left navigation column ends, the other columns just appear beneath it instead of floating by its side. I think the most fullproof solution for that is to have another container that is the full remaining size of the content minus the left column that it is floated against. In this case there will be no jumping under the navigation since all the inner floated items will be children of the floated parent.
 
Problem is that I'm not sure I want to limit myself to a peticular size. I belive I can fix it by having something like
Code:
<div container>
  <div left style=width 200px>
   left stuff here
  </div end left div>
  <div content style= width 600px>
    content stuff here
  </div content>
</div container>
But that limits me to a resolution of 800 x 600. I was really trying hard to make the page sort of flot to fit what ever resolution the system is set for. I'm not sure what I want to do now. I've actually been told that some people like the page wraping under the left nav bar. Personally I don't.
 
You could try giving the content div a margin-left equal to the navigation column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top