Jump to content

Ajust height depending on content...


NickBomb
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...