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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:04:45+00:00 2026-05-27T09:04:45+00:00

I have a traditional 3-column layout: nav, content and sidebar. The content and sidebar

  • 0

I have a traditional 3-column layout: nav, content and sidebar.

The content and sidebar both have a background-color that needs to cover 100% of the visible height at all times, regardless of how much content is in it. In other words, the background should remain there when scrolling down, or resizing the page.

Please see this jsfiddle for reference: http://jsfiddle.net/thv20/acJVw/1/

The problem is that when you scroll down or resize, the background cuts off. How can I fix this? I’ve seen suggestions of using min-height: 100%, but I can’t get that to work.

  • 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-05-27T09:04:45+00:00Added an answer on May 27, 2026 at 9:04 am

    Remove “height: 100%” off the body tag as this is what is breaking your layout.

    Instead, use position: absolute on the side bar and position it top:0 bottom: 0 as this will make its height “100%”. Also set right: 0 to position it on the right hand side of the container div (this is safe to do as you have set widths).

    CSS

    #container {
        position:relative;   /*add this to use position:absolute on child element */
        overflow: hidden;    /*add this to clear your floats*/
        width: 600px;
        margin: 0 auto;
        border: 1px solid black
    }
    
    nav, section{ 
        float: left; 
        width: 200px;
    }
    
    section {
        background: red;
    }
    
    sidebar {
        background: green;
        position:absolute;     /*add this and positions below */
        top:0;
        bottom:0;
        right:0;
    }
    

    JSFiddle: http://jsfiddle.net/acJVw/6/

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

Sidebar

Related Questions

I am writing an app which needs to have both the traditional form of
I'm writing a web based application that will have its own authorization/authentication mechanism (traditional
I have a pretty common layout issue that I have traditionally used a table
I have a table that needs to record geographical points (long, lat) for the
I have a traditional ASP.NET GridView. Inside of it I have a Template Field
I have looked on the web and the discussions/examples appear to be for traditional
I have tough time making this design decision. I could go with traditional new
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
I have a simple page that pops up a telerik radwindow on button click.
I have a huge table of 100k plus entries. In it a TEXT column

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.