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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:56:13+00:00 2026-06-14T13:56:13+00:00

So I have a webpage with a column. The column has a fixed header

  • 0

So I have a webpage with a column. The column has a fixed header up top, and a large scrolling body section, and the HTML/CSS below works fine for this.

The problem: I want to add padding to the bottom of the body, so if you scroll all the way down, you get some whitespace instead of having everything jammed right up to the bottom edge. Adding padding-bottom: 50px to .body works perfectly in Chrome; however, in Firefox, it appears that using the bottom property means that padding-bottom is ignored. If you drop bottom, the padding appears, but the scrollbar disappears.

test.html

<link type="text/css" rel="stylesheet" media="all" href="/test.css">
<div class="column">
  <div class="header">
    Fixed header
  </div>
  <div class="body">
    <h1>Body</h1>
    Where's the bottom padding?
  </div>
</div>

test.css

.column {
  position: absolute;
  height: 100px;
  width: 100%;
  background-color: green;
}

.header {
  position: absolute;
  height: 30px;
  background-color: red;
}

.body {
  position: absolute;
  top: 30px;
  bottom: 0;
  overflow-y: auto;
  background-color: blue;
  padding-bottom: 50px;  /* Broken in Firefox */
}

JSFiddle for the above: http://jsfiddle.net/jpatokal/PBwVa/

Is there a way around this? The one workaround I came up with was using a string of :last-child selectors to add padding to the very last element within .body instead, but, eww.

  • 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-14T13:56:15+00:00Added an answer on June 14, 2026 at 1:56 pm

    Adding a inner div inside the div.body with a margin-bottom seems to work in your jsfiddle.

    <link type="text/css" rel="stylesheet" media="all" href="/test.css">
    <div class="column">
      <div class="header">
        Fixed header
      </div>
      <div class="body">
        <div class="inner">
          <h1>Body</h1>
            Where's the bottom padding?
        </div> 
      </div>
    </div>
    

    and the (extra) css:

    .body .inner {
      margin-bottom: 30px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a basic two column webpage i did with css. it includes a
So I have a page of HTML that has its own CSS file. It
I have a webpage that displays a very large list of data. Since this
So I have a 3-column layout on my webpage, but I can't get the
I have a web page with a fixed 200px column on one side (contains
My webpage has a table mainly. The tables columns have different background. When I
The two images in the right-hand column of a webpage have been vertically stretched
I have a few checkboxes on top of my webpage which correspond to the
I have a column in a mysql table which has extra whitespaces on the
I want to have two columns on the bottom of this webpage I'm making,

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.