Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-27-2010, 06:37 PM   PM User | #1
perilperilperil
New to the CF scene

 
Join Date: Jun 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
perilperilperil is an unknown quantity at this point
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
perilperilperil is offline   Reply With Quote
Old 06-28-2010, 04:21 AM   PM User | #2
Candan
New Coder

 
Join Date: Jun 2010
Location: The Netherlands
Posts: 52
Thanks: 0
Thanked 6 Times in 6 Posts
Candan is an unknown quantity at this point
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);
Candan is offline   Reply With Quote
Users who have thanked Candan for this post:
perilperilperil (06-28-2010)
Old 06-28-2010, 06:02 PM   PM User | #3
perilperilperil
New to the CF scene

 
Join Date: Jun 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
perilperilperil is an unknown quantity at this point
YES, amazing, thank you! Works perfectly.
perilperilperil is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:31 AM.


Advertisement
Log in to turn off these ads.