Jump to content

Ajust height depending on content...


NickBomb

Recommended Posts

Hi, I have a DIV that acts as a menu.Or, actually, I have 4 divs organized as follows:<div class="leftmenu"> <div class="leftmenutop">Title</div> <div class="leftmenumiddle">Text</div> <div class="leftmenubottom"/></div></div>They have different background images, so it looks like a "box".I want the leftmenumiddle-div to resize so it's contents fits, even if I put more content than it's height.I've tried overflow:auto, but it didn't work.I hope you understand my problem, and that you can help me :)

Link to comment
Share on other sites

Puzzling. I do a very similar thing with my menus and the items expand as needed. I even verified just now with Firefox DOM inspector, and the red borders are exactly where they should be.I wonder if your CSS declarations are interfering somehow, especially anything that deals with position, top, left, height, etc.FWIW, the only div I position in my scheme is the outermost. The inner divs are just there. Obviously I don't know how your scheme works.I don't know if it has anything to do with anything, but I use a "parallel" set of nested divs to create each menu's "box"--rounded corners, drop shadow, etc. So in my case I know for sure that the imagery has zero impact on the text menu.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...