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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:39:10+00:00 2026-05-11T06:39:10+00:00

I am designing a website layout in which all of the content is held

  • 0

I am designing a website layout in which all of the content is held in a central column of a fixed width. I want this central column to have a different background color than the rest of the page. I also want the central column to extend from the very top of the browser to the very bottom.

I am able to successfully do this using a background image of dimensions 1000×1, as follows:

 html {     background: #333333 url(./images/global/background.png) repeat-y center; }  body {     margin: auto;     width: 1000px; } 

This works great in most browsers, but I would really prefer to be able to do it without an image.

I have tried setting ‘html’ and ‘body’ to have a ‘height: 100%’ and then giving ‘body’ a background color, but if there is enough content to warrant scrolling, the background only has a height equal to that of the browser and when you scroll down, the background stays behind.

Any tips are appreciated.

  • 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. 2026-05-11T06:39:10+00:00Added an answer on May 11, 2026 at 6:39 am

    The solution is to use a wrapper div that has 100% height and a separate content div that will extend if the content inside is long enough both having the background color set. Here is an example (tested in Firefox, Chrome and IE7):

    <html>     <head>         <style type='text/css'>             html {height: 100%}             body {                 height: 100%;                  margin: 0;                  text-align: center;//for IE7             }             div#wrapper {                  background-color: #efefef;                 width: 720px;                 margin: 0 auto;                 height: 100%;                 text-align: left;             }             div#content {                 background-color: #efefef;             }         </style>     </head>     <body>         <div id='wrapper'>             <div id='content'>                 <div style='height: 2000px'>test</div>             </div>         </div>     </body> </html> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer When you learned how to program a computer, you were… May 11, 2026 at 11:19 am
  • added an answer If you have editing permission to the PDF, you should… May 11, 2026 at 11:19 am
  • added an answer Here's what I ended up going with. It's a slightly… May 11, 2026 at 11:19 am

Related Questions

Currently I am designing a website and I am finding it VERY difficult to
Currently I am designing a new website and I want to plan it properly.
back story: I am designing a portfolio website for myself. on its home page,
I am designing a web site but it is behind a firewall and such
I am desiging a new website for my company and I am trying to
I am designing a new System and I have a lot of Interfaces that
I am designing a game to be played in the browser. Game is a
I am designing a class for log entries of my mail server. I have
I am designing a contact management system and have come across an interesting issue
I am designing a simple internal framework for handling time series data. Given that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.