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

The Archive Base Latest Questions

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

I’m having trouble with the layout of a simple HTML page. Please help. Here’s

  • 0

I’m having trouble with the layout of a simple HTML page. Please help.

Here’s the layout I’m going for…

Layout http://img516.imageshack.us/img516/9637/layoutfk5.gif

  • orange = body
  • blue/red = frame div
  • green = header image
  • black/white = menu div

It looks correct in Internet Explorer, but in Firefox, Safari, and Chrome there’s a 4-pixel gap between my image (header) and my div (menu).

Internet Explorer, Firefox, Safari, and Chrome…

Browsers http://img516.imageshack.us/img516/3292/browserszi8.gif

This is my HTML…

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> <html>     ...     <body>         <div id='frame'>             <img id='header' src='images/header.jpg' width='700' height='245' alt='' /><div id='menu'>                 <strong>One</strong> &nbsp;|&nbsp;                 <a href='two.html'>Two</a> &nbsp;|&nbsp;                 <a href='three.html'>Three</a> &nbsp;|&nbsp;                 <a href='four.html'>Four</a> &nbsp;|&nbsp;                 <a href='five.html'>Five</a> &nbsp;|&nbsp;                 <a href='six.html'>Six</a> &nbsp;|&nbsp;                 <a href='seven.html'>Seven</a> &nbsp;|&nbsp;                 <a href='eight.html'>Eight</a> &nbsp;|&nbsp;                 <a href='nine.html'>Nine</a>             </div>             <div id='content'>                 ...             </div>             ...     </body> </html> 

Notice there’s no whitespace between the IMG and the menu DIV.

This is my CSS…

...  div#frame {     background: #FF0000;     margin-right: auto;     margin-left: auto;     width: 700px;     border: 5px #30AADE solid; }  div#frame img#header {     margin: 0;     padding: 0;     border: 0; }  div#frame div#menu {     margin: 0 auto 0 auto;     padding: 5px 0 5px 0;     border-top: solid 2px #FFFFFF;     text-align: center;     font-size: small;     color: #88BE34;     background-color: #000000; }  div#frame div#menu strong {     font-size: medium;     color: #FFFFFF; }  div#frame div#menu a {     color: #88BE34; } 

Why are Firefox, Safari, and Chrome showing that 4-pixel gap?

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

    It has to do with the default rules for IMG tags.

    I recommend always using this in your stylesheet as a default rule:

    img{     display:block; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a

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.