Log in

View Full Version : simple layout, but one of my divs wont stretch to 100% height



forumname
12-10-2008, 07:36 PM
this is a 2 column layout. Ill post the source for it.
Basically theres a div called content that has 2 divs in it, one called leftmenu and one called center.
On all of my pages the center div is taller than the menu, so I want the menu div to be the same height as the center div (so my background image repeats all the way down). Right now the menu doesnt go any farther than however many links are in the menu.

http://www.quickfiles.net/781835

its a zip file, 8kb. 5 images, 1 css file, 1 html file.

Snookerman
12-11-2008, 08:37 AM
Try adding this to your css:

html, body, #div-you-want-to-stretch {
height:100%;
}

monicasaha
12-11-2008, 08:56 AM
plz chk the attachment. Hope this may solve your Problem.

Snookerman
12-11-2008, 09:08 AM
Maybe you could say what you changed to teach other people trying to do this?

monicasaha
12-11-2008, 09:31 AM
r u asking me...snookerman.........??

monicasaha
12-11-2008, 09:37 AM
if yes then i must tell u that i have already gone through such problem.........i solved it in this way.
particularly in this problem , if we use table it can be very easy....as much as i know .. But to solve it with div i have used this process...
i m here to know many things to learn.. i have already learn a lot of things from this forum and particularly from u as well snookerman. i have given my suggestion.. if u can solve it any other ways.. i will eager to know that.
Thanks

Snookerman
12-11-2008, 02:01 PM
Yeah, it would be interesting to know how you solved it. It's easier if you explain what you did that if I have to download both files and then compare them to find all the differences.

monicasaha
12-12-2008, 05:35 AM
ohh I thought you had gone through my solutions... then commented........

Now I have nothing to explain unless you go through my files.

forumname
12-13-2008, 08:05 PM
I consider this to be a hack solution, but it is exactly the kind of hack-logic I need to learn. Thanks that is a good idea to make the big div have my background, since it doesnt work right in the menu.

To the guy that said


html, body, #div-you-want-to-stretch {
height:100%;
}
that does not work.

Snookerman
12-13-2008, 08:14 PM
Yeah, I suspected that wouldn't work, that's why I hoped Monica would tell us what the solution was so we wouldn't have to go through the files and look for differences. It would also be easier and better for other people looking at the thread in case the attached files disappear.