Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    100% Height Divs

    I feel like a dumbass for posting this, since googling it brings up a million identical questions, all resolved. But I seriously think this has happened to me in every website I've ever made, and I always end up giving up and finding a way to cheat around it.

    The question: How do I make my DIVs stretch to contain all the content I put in there? They always hit the bottom of the viewable browser window, then give up.


    Here's the (ugly) site I'm currently working with.


    Here's the CSS

    So I have HTML and Body height at 100%, .outerblue and .content at height and min-height 100%, and a bunch of other things that were supposed to work. I'm currently using Firefox, and I have a sneaking suspicion that getting this to work in other browsers will be a whole other event. I'm also using 960 grid, and although I always have the same problem even while not using a grid, I suppose that could have something to do with it.

    I would be eternally grateful for your help here! Feel free to point out any other sloppy things you notice in my CSS -- I'm self-taught, and I feel like poor base knowledge of CSS is the source of most of my problems. :/
    Last edited by perilperilperil; 06-28-2010 at 06:03 PM. Reason: Resolved

  • #2
    New Coder
    Join Date
    Jun 2010
    Location
    The Netherlands
    Posts
    52
    Thanks
    0
    Thanked 6 Times in 6 Posts
    Before you end your white box's div add: (So like <div class="white_box"> all your other stuff ----PUT CODE HERE </div>)
    <div class="clear"></div>

    Do the same for your blue box.

    Now go to the CSS, and change height:100% to height:auto; min-height:500px; for the blue box and the white box.

    (I've simulated this in firebug, and it worked);

  • Users who have thanked Candan for this post:

    perilperilperil (06-28-2010)

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    YES, amazing, thank you! Works perfectly.


  •  

    Posting Permissions

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