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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:36:49+00:00 2026-05-23T12:36:49+00:00

If I set the img’s size to 100*100, the containing div will be like

  • 0

If I set the img’s size to 100*100, the containing div will be like 100*106.

Where does that extra ‘6px’ come from? How does this behavior fit to the standard?

  • 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-23T12:36:50+00:00Added an answer on May 23, 2026 at 12:36 pm

    @clyde; yes this is a natural behavior of image because img is an inline element so user agents leave some space for descender characters.

    you can remove it with css:

    img { display:block; } or img { vertical-align:bottom; }
    

    FOR MORE CHECK THESE

    https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps

    Unwanted padding-bottom of a div

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

Sidebar

Related Questions

I have a set of img boxes that are marked up like this I
I have an img element set next to a div. I have tried a
I want to set the width and height of the container <div> of <img>
There are many answers on SO that show how to set an img src
Some people set default src to img element in the following way: <img src=foo.jpg
1 set: $('#tabs li:first-child').addClass('first-child'); $('.photos li:first-child').addClass('first-child'); $('#alphabet li:first-child').addClass('first-child'); 2 set: $(function(){ $(#header-thumbs img).fadeTo(fast,1); $(#header-thumbs
I'm Student with EXTJS4.. I added Ext.Img to AbsolutePanel, and I set the Position.
set<int> A, B; for (int i = 0; i < 100; i++) A.insert(i); for
I have a rectangular CPImage setup like so var img = [[CPImage alloc] initWithContentsOfFile:Resources/img.jpg];
So here is my situation, and the solution that I've come up with to

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.