Results 1 to 10 of 10

Thread: simple layout, but one of my divs wont stretch to 100% height

  1. #1
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default simple layout, but one of my divs wont stretch to 100% height

    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.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Try adding this to your css:
    Code:
    html, body, #div-you-want-to-stretch {
    height:100%;
    }

  3. #3
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Smile

    plz chk the attachment. Hope this may solve your Problem.

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Maybe you could say what you changed to teach other people trying to do this?

  5. #5
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Default

    r u asking me...snookerman.........??

  6. #6
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Default

    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

  7. #7
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    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.

  8. #8
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Default

    ohh I thought you had gone through my solutions... then commented........

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

  9. #9
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

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

  10. #10
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •