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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:56:31+00:00 2026-06-16T04:56:31+00:00

For the past few days, I’ve been struggling with some odd spacing on a

  • 0

For the past few days, I’ve been struggling with some odd spacing on a website I’m building. Originally, I thought it was a display issue with Chrome, but I’ve been able to duplicate the problem in IE8, IE9, Firefox and Safari. I’m using old school HTML/CSS for backwards compatibility, so I can say it’s not IE handling of HTML5 or some other bleeding edge update.

While some of the solutions on line have led me to try different things including floating the hedad, nothing’s been successful & I always have padding on one of the long sides.

I have stripped this down to the BAREST of essentials to reproduce the problem, and have included a screen shot of the padding I can see on my end. I would certianly appreciate another set or seven of eyes showing me what I missed.

EDIT: line height turned out to the the culprit on this one, but vertically aligning the image to top per suggestion left the text at the top of the div. My sense would be that the header tag would preserve the default value, but that the and the img tag within the header would override that. Or can I only have one vertical align per div?

Second, is there a way to collapse line-height with CSS?

HTML CODE

<html>  
        <head>
             <title>Test</title>
             <LINK rel="stylesheet" href="test.css">
        </head>
        <body>
             <div id="header">
             <img src="bluespacer.gif" height=125 width=400>
             TEST
             </div>
        </body>
    </html>

CSS CODE

#header {
        font: serif;
        color: blue;
        background-color: gray;
    }

My output looks like below

screen capture

and here’s the bluespacer.gif; 1px x 1px. Look close, it’s like a dust speck!

( bluespacer.gif ) <—

  • 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-16T04:56:32+00:00Added an answer on June 16, 2026 at 4:56 am

    You’re looking at the wrong spot. It’s not padding but line-height, that generates that white space.

    Try to vertically align the image:

    #header img {
      vertical-align: bottom;
    }
    

    Explanation: In the default style, the image is placed on the baseline of text. That is, the lower edge aligns roughly with the lower edge of, say, the letter ‘x’. But because text has descenders (like ‘g’ or ‘j’), the surrounding box is drawn higher, which leads to the extra space below the image.

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

Sidebar

Related Questions

I have been encountering issues for the past few days with ajaxing in some
So, for the past few days I have been struggling to understand how to
I've been into this issue for the past few days, I'd like to request
For the past few days I've been writing classes that at first I thought
For past few days, I had been struggling with Merging assemblies inside a single
A grinder script i have been building out for the past few days has
I have been struggling with a problem in the past few days. I really
I have been building my own carasol over the past few days. My Jquery
I have been looking into this issue for the past few days and cannot
For the past few days I've been working on an online game, a 2-player

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.