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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:27:23+00:00 2026-06-08T18:27:23+00:00

Fiddle illustrating the problem – click the button a few times and the box

  • 0

Fiddle illustrating the problem – click the button a few times and the box will shrink, revealing the issue.

This issue appears to only happen in Internet Explorer.

Basically, when an element that contains white-space: pre-wrap is resized slowly, IE doesn’t recalculate word wrapping, resulting in text being pushed outside the element. Some recalculating does happen, but not all of it. The more the element is resized, it seems, the more recalculation is actually done.

Zooming the page fixes the issue, but is obviously not a practical solution.

How can I force IE to recalculate word wrapping when the container’s size changes?

  • 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-08T18:27:24+00:00Added an answer on June 8, 2026 at 6:27 pm

    New (ridiculous) HTML Change Solution (but works!)

    Because of the odd first line failure, the solution depended upon generating a non-important first line and then accommodating it. This fiddle demonstrates what appears to be a now “bug free” solution for IE9 (some tweaking to account for my pseudo-element/class use would be needed for earlier IE versions).

    The HTML requires an excessive amount of wrapping, such that each section of text is “double wrapped.” The demo has three different means of gaining the block level wrap, but all use the same fix.

    Essential HTML

    <div id="cnt">
      <p class="ieFixBlockWrap">
        <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt consectetur tortor, sed vestibulum lectus hendrerit at. Praesent fermentum augue molestie lectus pharetra eget cursus erat cursus.
        </span>
      </p>
      <span class="ieFixBlockWrap">
        <span>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent fringilla nisl posuere tortor rutrum lobortis.
        </span>
      </span>
      <div class="ieFixBlockWrap">
        <span>In risus libero, faucibus ac congue et, imperdiet ac purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam lobortis ullamcorper. Proin risus sapien, pulvinar in adipiscing non, rutrum hendrerit magna. Praesent interdum pharetra vehicula. Integer molestie mi neque.
        </span>
      </div>
    </div>
    

    CSS

    #cnt {
        white-space: pre-wrap; 
        border:1px solid black;
        line-height: 1.2em; /* set explicitly, see below */
        /* prevent shifted :before from interfering with elements preceeding #cnt */
        overflow: hidden; 
    }
    
    .ieFixBlockWrap:before { /* this becomes the first line, but also an extra line gap */
        content:''; 
        display: inline-block;
        width: 100%;
    }
    
    .ieFixBlockWrap { 
        display: block; /* just to demo span as block level */
        margin: -1.2em 0; /* offset by line-height to remove gaps from :before*/
    }
    
    .ieFixBlockWrap:last-child {
        margin-bottom: 0; /* last one does not need the bottom margin adjusted */
    }
    

    Original HTML Change Solution (still failed on first line)

    Wrapping all the text in a single span inside the div set with pre-wrap seemed to make it behave in this fiddle.

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

Sidebar

Related Questions

fiddle code: <button onclick=this.disabled=true; setTimeout(function(){this.disabled=false;},500);>click</button> this seems to refer to the window rather than
I have a fiddle located here illustrating my problem, namely that when I load
Made a fiddle for this: http://jsfiddle.net/terjeto/MN4FJ/ My problem is that dragleave fires when you
Please see this Fiddle . QUESTION #1 If you click on Overview and click
I made this fiddle to show my problem. I have a list and I
I made this fiddle to demonstrate the problem. Table margins don't collapse in Firefox,
Please look at this fiddle: http://jsfiddle.net/uNbYu/1/ When the submit button is pressed once, It
Here's a fiddle illustrating the problem. I am adding a jQuery one binding on
Here's a fiddle I setup illustrating the problem. http://jsfiddle.net/rgfjL/13/ Here's the code HTML <div
Fiddle: http://jsfiddle.net/amitava82/dawkn/6/ The input elements will be generated dynamically based on json data received

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.