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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:01:34+00:00 2026-06-13T18:01:34+00:00

The display: inline-block; property in IE seems have padding and margin that I can’t

  • 0

The display: inline-block; property in IE seems have padding and margin that I can’t clear no matter what I try and do. Has anyone else encountered this bug and knows how to fix it?

  • 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-13T18:01:35+00:00Added an answer on June 13, 2026 at 6:01 pm

    It’s most likely because you have at least one space or linebreak between the inline-block element tags in your markup.

    Linebreaks will be converted to a single space between inline-block elements. So the extra space you’re seeing is not padding or margin, but an actual space character in the text of the containing element.

    There are a few workarounds:

    1. Uglify Change your markup to remove or reposition the linebreaks:

      <ul>
          <li>item</li>
          <li>item</li>
      </ul>
      <!-- becomes -->
      <ul>
          <li>item</li><li>item</li>
      </ul>
      <!-- or -->
      <ul>
          <li>item</li><li>
              item</li>
      </ul>
      
    2. Use float: left or float: right to display your block elements inline instead of inline-block. Note that this will introduce other issues, like having to ensure that the containing element is clearfixed.

    3. Set word-spacing: -1em on the containing element. Note that if your inline-block elements contain any text, and you don’t want this text to have wonky word spacing, you’ll need to override the inherited rule with word-spacing: normal on the inline elements. Demo: http://jsbin.com/ucivel/1/edit

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

Sidebar

Related Questions

I have an li styled as follows: li{ display:inline-block; padding:5px; border:1px solid none; }
<div style=display: inline-block; margin: 0 auto;> <input id=abc type=button value=button /> </div> I try
my code is something like this //css li{display:inline-block} //html #li margin and width are
My current CSS: .DataForm input { margin-right:9px; display: inline-block; width:21%; min-width:30px; } works fine
I have the following div <body> <span style=border:1px solid red; display:inline-block> Some text<br />
I've got a series of thumbnail container elements with the css property display:inline-block but
Suppose I want to set the display property of a div to inline-block. In
What is the difference between div with the property display:inline-block and span with display:inline-block
.fooBar { float: left; display:inline-block; height: 600px; margin-right: 0px; } $('.fooBar').click(function(){ $(this).css('margin-right', '20px'); });
I'm working with a few div s that are set to display: inline-block and

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.