Jump to content

height:100% cuts off at bottom of viewport


Recommended Posts

Hi, I've googled this issue (and searched here) and the explanation I've found is that the parent divs need to have height:100% (html,body), but that solution doesn't seem to be working for me.

Check out the site: http://7cpco.com/beta/index.html

and the css: http://7cpco.com/beta/css.css

If it all fits in your screen, resize your window (to be smaller), what's happening is that when the content extends beyond the viewport, the background will not keep going, it stops before the content ends (in both FF and IE).

Thanks for your help!
Curt

Link to comment
https://forums.phpfreaks.com/topic/31523-height100-cuts-off-at-bottom-of-viewport/
Share on other sites

  • 2 weeks later...
Very nice looking site. Very complex CSS, though.

In my experience, using a single image as the background for the entire HTML, BODY works best. You can still do a centered <DIV> with a header and footer, all your corner graphics, etc. So long as the background image is part of the HTML, BODY it should stretch just fine.

Now, that being said, you might be able to get your code working with floats and clears. See if this helps:

http://www.greywyvern.com/code/min-height-hack.html
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.