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 4 of 4
  1. #1
    Tjk
    Tjk is offline
    New Coder
    Join Date
    Aug 2005
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Problem: Getting the div to stretch to bottom of page

    I was wondering how to set a div box (in my case) to stretch to the bottom of a page no matter what? IE So even if the page is longer than usual it will still always stretch to the bottom of the page.

    Cheers in advance for any help.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Check out the layouts here. Notice the min-height:100%; and the * html #container {height:100%} because IE doesn't care about heights but thats one way to fake a min-height of 100% in IE. All of those layouts will be 100% height if the content doesn't fill them up, but if filled up they will expand. To create an equal length effect with the columns and content you need to use a repeating background image.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Tjk
    Tjk is offline
    New Coder
    Join Date
    Aug 2005
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Another quick question... around your CSS theme I there are no gaps (specifically in the header). Which CSS attribute sets that? I seem to have a constant gap between the edge of my page and the header image which I want to get rid of.

  • #4
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    body, html {
    margin: 0;
    padding: 0;
    }


  •  

    Posting Permissions

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