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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:21:09+00:00 2026-06-04T20:21:09+00:00

When I change my website to <!DOCTYPE HTML> Every img element that is wrapped

  • 0

When I change my website to

<!DOCTYPE HTML>

Every img element that is wrapped inside a DIV has a 3px bottom margin to it even though that margin is not defined in CSS. In other words, there are no style attributes that are causing that 3px bottom margin.

<div class="placeholder">
    <img alt="" src="/haha.jpg" />
</div>

Now let’s say haha.jpg is 50×50, and .placeholder is set to display: table. Strangely the height dimensions of .placeholder in my observation is 50×53…

Has anyone encountered this anomaly before and fixed it?

EDIT

Here is the JS FIDDLE

http://jsfiddle.net/fRpK6/

  • 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-04T20:21:11+00:00Added an answer on June 4, 2026 at 8:21 pm

    This problem is caused by the image behaving like a character of text (and so leaving a space below it where the hanging part of a “y” or “g” would go), and is solved by using the vertical-align CSS property to indicate that no such space is needed. Almost any value of vertical-align will do; I’m fond of middle, personally.

    img {
        vertical-align: middle;
    }
    

    jsFiddle: http://jsfiddle.net/fRpK6/1/

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

Sidebar

Related Questions

A client is requesting that we change the default sections for a department website.
So I have an MVC app that should change the Website title, and header
My problem is that my company's website has recently been getting the following parse
My boss has asked for a page that will not change to have two
Short question: Can I change the DOCTYPE of my existing XHTML 1.0 website to
I'll jump to an example. <!DOCTYPE html> <head> <title>Transposing div using CSS</title> <style> div#wrapper
I trying to change a website that is already up and running. I have
Is there a way to extract the text from a website (That only has
I want to allow user change my website theme color by clicking on a
To change the language on my website I've been using ressources and this code:

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.