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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:20:54+00:00 2026-05-13T23:20:54+00:00

I have a div (sub area of page with scroll bar) that has some

  • 0

I have a div (sub area of page with scroll bar) that has some text, an image and a table.
The background color defined for the div –

<div style="background-color: white">

does not fill the area to the top, the top arrow of the scroll bar is above the area filled with the background color (by about the width of one line). Adding a br at the top fixes it, but moves stuff too far down.

I read two potential solutions. One suggested I set a fixed height for the div. That would require changing the height by trial-and-error every time I changed the content of the page. Next. The other suggestion said to add this at the end, just before the /div –

</div>
<div class="clear"></div>
</div>

but that has no effect.

There are several different pages that get loaded into the scrolling area, using SSI’s, and some of those included pages use divs, and some of those are floats and some absolutes.

Thanks for any help.

EDIT

Adding the following, which I didn’t realize was needed with the “clear”, still doesn’t work

<style type="text/css">
.clear {
clear:both;
height:1px;
overflow:hidden;}
</style>

Ad

  • 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-13T23:20:54+00:00Added an answer on May 13, 2026 at 11:20 pm

    I just wrote this up and it seems to keep the background color no matter how much content you put in it…

    <div style='background:#abc;overflow:auto;'>
        <p>a bunch of content goes here</p>
    </div>
    

    you can, of course, set a height to that but more likely it would be in some div wrapper…

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

Sidebar

Related Questions

I have DIV element which only has a few lines in and a background
in my html page I have div with css: padding: 0px; color: rgb(51, 51,
I have a some html that looks like this <div id=main> <div id=sub_main_1 class=sub_main>
I have a slider-like widget which is basically, a div of sub-divs containing some
I have following code snipped in _Layout.cshtml <div id=sub-navig-container> @RenderSection(subNavig) </div> <div id=text-content> @RenderBody()
I currently have a navigation bar displaying all the children of that specific page
I have a database table and that table has 6 rows. What I want
I have the following html <div class=sub> <a href=# id=people>People</a> </div> which has the
I have a middleContent div which has two sub-divs acting as columns. The middleMain
I am having a main div PricingBar inside that i have 3 sub div's

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.