Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8741203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:16:10+00:00 2026-06-13T11:16:10+00:00

Okay there are 2 scenarios: I have a layout like this: —————- button header

  • 0

Okay there are 2 scenarios:

I have a layout like this:

----------------
button header
----------------
Contents
Contents
Contents
Contents (with scrollbar)
Contents
------------
footer
------------

What I want to achieve is:
The buttonheader and footer must always stay in view – the content must be scrollable.
The buttonheader can be empty – thus the scrollable content should move above the
buttonheader – there is no point in losing space if there is no buttons
.

So absolute/fixed positioning seems to not be an option so I tried with relative. (The reason absolute is no solution, is because if the contents are placed absolutely there, they will never move in case the buttonheader is empty.)

I set the height to percentage – but It will of course look very bad in case someone resizes the window.

Look here and resize the outputwindow:

sad attempt on how to get a working relative positioned scrollable content

The second version:

is to show what it should behave like (at the top part) – content should stick to top of the page – footer is wrong here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:16:11+00:00Added an answer on June 13, 2026 at 11:16 am

    The flexible behavior sounded a lot like that of a table-row, so I went that way in CSS.
    Added a few extra div’s to make firefox play nicely inside the main cell.

    See http://jsfiddle.net/willemvb/XMEcC/

    #container{
        position: relative;
        width: 300px;
        display: table;
        height: 100%;
    }
    
    #header, #footer{
        width: 100%;
        height: auto;
        display: table-row;
    }
    
    #main{
       height: 100%;
       display: table-row;    
    }
    
    #cell{
       display: table-cell;    
    }
    
    #wrapper{
        position: relative;
        width: 100%;
        height: 100%;   
    }
    
    #overflow{
        overflow-y: scroll;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width:100%;
    }
    

    Edit: only tested in FF and Safari

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello there okay so this is the deal i have my mp3 files on
Hello there okay so this is the deal i have a folder where my
Okay so I feel like there's something obvious I'm missing in this question. I've
Okay I know there are a lot of questions about this and a lot
Okay this question is very simple: I have a facebook page, and a website.
Okay so I have a list of addresses and next them there is a
Okay, I have: class Content(db.Model): code=db.TextProperty() And there are 3 different values of code
Okay so this has been modified there is still 3 tables board, account, log
There is info that Android's DownloadManager support ETags. Okay, I have a server with
Okay, There seems to be a lot of discussion on here about how terribly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.