SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,068
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE8+ - Auto height Sticky footer fixed header and footer

    I am implementing Paul O'Bs IE8+ - Auto height Sticky footer method, with the difference though that I would like to have the header and footer to be fixed and that the middle content will scroll when there is more content then the viewport. I tried everything but the entire principle is breaking when I use position: fixed for header and footer. Should i use a different method to accomplish this?
    “Good artists copy, great artists steal” (Pablo Picasso - 1934)

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You could only really do that if you have a fixed height for your position:fixed header and footer. The reason is that fixed elements are removed from the flow so you cannot make the middle section avoid them unless you have set specific heights for the fixed elements.

    In essence you could just apply your fixed header and footer and then set the content to be absolutely positioned at top xxpx and bottom xxpx where xxpx is the height of your header/footer.


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
  •