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

  • Home
  • SEARCH
  • 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 8875447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:58:38+00:00 2026-06-14T18:58:38+00:00

Maybe this has been discussed here before, but I was unable to find a

  • 0

Maybe this has been discussed here before, but I was unable to find a related post. So here is my problem:

I have a html site with a banner and a content area. The banner area has a border at the bottom:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>TEST</title>
    <style type="text/css">
        #banner, #content {
            width: 1000px;
            margin-right: auto;
            margin-left: auto;
        }
        #content {
            background-color: green;
        }
        #banner {
            background-color: red;
            border-bottom: 1px solid rgb(200, 200, 200);
            height: 70px;
        }
    </style>
</head>
<body>
    <div id="banner">
        <h3>Banner</h3>
    </div>
    <div id="content">
        <h3>Content</h3>
    </div>
</body>
</html>

The problem is the horizontal whitespace between the banner and the content div (which I don’t want).

However, if I move the border-bottom from the banner div to a border-top of the content div the whitespace dissapears and everything is rendered as I would have expected it. This seems strange to me, but is at least consistent between chrome and ie9 (haven’t tested other browsers yet). What is the reason for this behaviour? It seems that is caused by the h3 tag. Note also, that the page height varies depending on the positon of the border.

  • 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-14T18:58:40+00:00Added an answer on June 14, 2026 at 6:58 pm

    It will be the margin of the h elements. Do h3{margin:0px;} That should sort the gap 🙂

    EDIT :

    If the gap persists try padding on the h elements too.
    Or the error could be with the margin between the banner and content.

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

Sidebar

Related Questions

Maybe this has been answered before, but I was not able to find it.
Maybe this has been asked before, but I couldn't find it. My question is
Many apologies if this has been answered, but I have been unable to find
Maybe this question has been asked before, but I couldn't find it. I am
Maybe this has been asked before (where I didn't find it)... I have a
Maybe this question has been asked many times before, but I never found a
This has been asked before, but I couldn't find a newer result than 2010.
Sorry if this has been answered before, but all the related questions didn't quite
Maybe this question has been answered before, but the word if occurs so often
I am sure this has been asked but I can't find it (maybe I

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.