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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:20:09+00:00 2026-05-27T21:20:09+00:00

I have something like the following code: <div style=border:2px black solid;overflow:hidden;> <span style=float:right;> <img

  • 0

I have something like the following code:

<div style="border:2px black solid;overflow:hidden;">
    <span style="float:right;">
        <img src="sprintlogo.png" alt="Test Image 1" />
    </span>
    <img src="sprintlogo.png" alt="Test Image 2" style="float:left;" />
    <p>Test Text</p>
</div>

For some reason, the bottom border around the <div> is not flush with the images, etc. For example, we get things like this:

Example

It’s not an issue with the images or anything (i.e. there is no whitespace in the image file).

By adding background-color:blue; to the <span>‘s style attribute, we can see that the span seems to be taking up extra space.

Example 2

I tried messing with the span’s margin and padding to no avail. Does anyone have an idea of what is going on?

  • 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-27T21:20:10+00:00Added an answer on May 27, 2026 at 9:20 pm

    Very strange indeed.

    I found that by removing the span and simply floating the image right it removes the extraspace. Indicating the issue was in the span.

    Then I looked at firebug and found that the extra space was rendered height.

    Apparently the space is being creating by a stray character (which is odd because the character is still there if you remove whitespace…), as demonstrated here where I turn font-size to 0 and the space goes away.

    Edit

    Yeah the issue is most definitely that the image is being positioned assuming there is text and aligning it with the imagarinary text (veritcal-align:baseline;) another fix would be to align the image with the bottom of this text here.

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

Sidebar

Related Questions

I have the following code: <div style=width: 100px; overflow: hidden; border: 1px solid red;
I have something like the following <div id=container> <ul id=name_list> <li class=name> <input type=hidden
I have something like the following jQuery code buttons = document.createElement('div'); $(buttons).addClass(overlay_buttons).css({ styles });
I have something like the following code: template<typename T1, typename T2, typename T3, typename
i've got the following Problem / Question: I have HTML Code like this: <div
I have the following code, I have implemented something like this so far, but
I have HTML something like the following: <div id=quoteContainer> <div class=quote prototype></div> <div class=quote
I have the following code: <div id=elm0 data-color=color data-size=size data-more=more>something</div> <div id=elm1>This element must
I have something like the following data structure: Category StartDateTime EndDateTime =============================================== 1 12/1/2009
Suppose I have something like the following in test.cxx (and that I do the

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.