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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:43:36+00:00 2026-05-30T02:43:36+00:00

I have a webpage where I have a header section and then some content.

  • 0

I have a webpage where I have a header section and then some content. In the content, I have a grid and some of the views show many columns which (depending on the screen size) will create a horizontal scroll bar on the browser)

my html looks like sort of like this:

 <head></head>
 <body>
      <div id="TopHeader"></div>
      <div id="MainContent"></div>
 </body>

so often the content that is inside of “MainContent” is wider than the screen . Right now I have my css for my div like this:

 #TopHeader {
    background-color: black;
}

but when I scroll over to the right, the background of this section is white. I tried to solve this by doing this:

#TopHeader {
min-width:1150px;
    background-color: black;
 }

which helps a little bit but this is a hard coded solution and if the width happens to be > 1150px, I run into the same problem.

The only other thing I can think of is to put TopHeader inside of main (which will fix this). something like this:

 <head></head>
 <body>
      <div id="MainContent">
            <div id="TopHeader"></div>
       </div>
 </body>

but the issue there is that I want padding around my content (what was the MainContent section and I don’t want this padding around the top header so that doesn’t seem to work. If i create a new div like this

 <head></head>
 <body>
      <div id="MainContent">
            <div id="TopHeader"></div>
            <div id="InnerMainForPadding"></div>
       </div>
 </body>

I am back to the original problem listed above.

Any suggestions ?

  • 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-30T02:43:37+00:00Added an answer on May 30, 2026 at 2:43 am

    How about having the scroll bar on the content wrapper instead of the browser window?

    #MainContent {
        overflow: auto;
    }
    

    Live demo: http://jsfiddle.net/SUfkh/2/show/

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

Sidebar

Related Questions

I have a header on my webpage that contains the some javascript for some
Basically, I have this webpage that is the header on any page you go
Lets say I have a header banner on a webpage I'm about to print.
I have a webpage that implements a set of tabs each showing different content.
I have a jQuery image slider on the header section of my website that
I have a webpage with header footer and all. when i print that page
Is there any reason to NOT have a webpage retrieve it's main content on
I have this code for reading webpage. I need to send http header to
I'm currently making a webpage and I have run in to some problems with
I have a webpage in which I am using 2 jsp:include directives. Basically one

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.