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 8769179
In Process

The Archive Base Latest Questions

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

This question would have been a duplicate of header and footer fixed, content scrollable

  • 0

This question would have been a duplicate of header and footer fixed, content scrollable and Fixed header, footer with scrollable content if not for one detail, which is very important for me – I do not want to specify a fixed height and width for the content.

http://jsfiddle.net/mark69_fnd/PWRDa/ contains a real form with dummy data, demonstrating the problem – resizing the window makes the scrollbars appear, but on the page, rather than on the form. In the current layout the menubar and the statusbar are scrolled out of view and I want them to remain fixed, while the form data gets scrolled.

Please, do not provide a solution with absolute width and/or height. I prefer calculating them in javascript, rather than baking them into the CSS, unless it is 100%. Of course, pure HTML/CSS solution is preferable.

Here is the CSS:

html, body, .yui3-app-views {
    height: 100%;
    width: 100%;
}

.container {
    position: relative; /* needed for footer positioning*/
    margin: 0 auto;
    height: auto;
    min-height: 100%;
    background-color: #eee;
}

.content {
    background-color: #ddd;
    padding: 0em 0em 2em; /* bottom padding for footer */
    overflow: auto;
}

#footer {
    position: absolute;
    width: 100%;
    bottom: 0; /* stick to bottom */
    background-color: #ccc;
}

#status {
    border: solid 1px #000000;
}

#status .error {
    color: red;
    font-weight: bold;
}

/* ------------------------------------------------------------------------------------*/
.char {
    display: inline-block;
    vertical-align: top;
}

.line {
    white-space: nowrap;
}

/* --------------------------------- fieldset and legend ------------------------------*/
.fieldset {
    border: 2px groove threedface;
    margin-top: 1em;
}

.fakeFieldset {
    padding: 2px;
}

.fieldset > div.legend:first-child {
    display: inline-block;
    text-align: left;
    margin-left: 10px;
    background: #ddd;
    position: relative;
    top: -0.7em;
}

.merge-bottom {
    margin-bottom: -2px;
}

/* ------------------------------------ Forms ------------------------------*/

form div {
    white-space: nowrap;
}

form select, form input {
    margin: 2px;
    border: 1px groove;
}

form label:not(.same-line) {
    width: 8em;
    text-align: right;
    display: inline-block
}

#cust-balance {
    text-align: center;
}

.ccExpDate {
    width: 2em;
}

#cust-salutation {
    width: 4em;
}

.postalCode {
    width: 7em;
}

#cust-ccAddress {
    width: 20em;
}
​
  • 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-13T17:16:12+00:00Added an answer on June 13, 2026 at 5:16 pm

    // Updated with input from asker.

    This works great. Mine have widths set to 100%, but of course you can do that in JS if you want.

    You need to give the header and the footer position:fixed

    I also put some padding in the .content div to make room for the top header.

    Like the following:

    html, body, .yui3-app-views {
        height: 100%;
        width: 100%;
    }
    
    .content {
        background-color: #ddd;
        padding: 2em 0em; /* padding for footer and header */
    }
    
    .menubar {
         position: fixed;
         top: 0px;
         width: 100%;
         z-index:1;
    }
    
    #footer {
        position: fixed;
        width: 100%;
        bottom: 0; /* stick to bottom */
        background-color: #ccc;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked at this question which has been suggested as a duplicate: Make
Firstly, I do not have any malicious intent out of this question. I would
I thought this question would have already existed on SO, but then I couldn't
This is hopefully a simple question: I have an OpenGL texture and would like
i have a simple question: i have this var: $v = 24000,1500,1500,1500,1500,1500,; i would
This may seem like a basic question. I have a light-weight website and would
I've never really been poised with this question: But would it be a terrible
I know variants of this question have been asked frequently before (see here and
First, my question might sound like a duplicate, but I have been going through
This could be a duplicate question, but I have no idea what search terms

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.