none
Different output observed in IE8 and IE11 for same HTML file RRS feed

  • Question

  • when I open the below html code in ie8 and ie11 the output is different.

    <div style="  color: EAE6F1;   " id="Screen147">
    
    
    <img style="    width: 1280; height: 1020; " id="item1" src="Desert.jpg" border="0"/>
    
    <div style="  background-color: FFFFFF; color: 000000;   font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item2">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    
    <div style="  background-color: FFFFFF; color: 000000;   font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item3">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    
    <div style="  background-color: FFFFFF; color: 000000;   font-family:  'Arial'; font-size: 31px; layout-grid: both fixed 51px 32px; white-space: nowrap; " id="item4">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
    

    I want to display a white block in the image. but when run in IE8 the white block appears bigger as compared to when displayed in IE11. 

    I wanted to know why is this behaviour and if the code is same then the output should also be the same. can anyone help me to understand this behaviour?

    thank you very much in advance for your replies.

    Friday, March 6, 2015 4:50 PM

Answers

  • By default IE8 renders pages in Compatibility mode. To get it to render in fashion closer to IE11, you need to trigger IE8 to render in Standards mode. A quick search will produce a few ways to do that.

    Usually adding a strict doctype like <!DOCTYPE html> works.

    Friday, March 6, 2015 9:47 PM
  • Hi yashajmera,

    Same script gets different results ,just as Greg said this may be related to the different rendering pages methods between different Internet Explorer versions.
    Here is a link for reference :
    Specifying legacy document modes
    https://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx

    We also can try to choose different view mode by F12 tool to have a check .

    To get more detailed information ,it is recommended to look for help from our MSDN forum for help.

     https://social.msdn.microsoft.com/Forums/ie/en-US/home?forum=iewebdevelopment

    Best regards


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, March 9, 2015 7:24 AM
    Moderator

All replies

  • By default IE8 renders pages in Compatibility mode. To get it to render in fashion closer to IE11, you need to trigger IE8 to render in Standards mode. A quick search will produce a few ways to do that.

    Usually adding a strict doctype like <!DOCTYPE html> works.

    Friday, March 6, 2015 9:47 PM
  • Hi yashajmera,

    Same script gets different results ,just as Greg said this may be related to the different rendering pages methods between different Internet Explorer versions.
    Here is a link for reference :
    Specifying legacy document modes
    https://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx

    We also can try to choose different view mode by F12 tool to have a check .

    To get more detailed information ,it is recommended to look for help from our MSDN forum for help.

     https://social.msdn.microsoft.com/Forums/ie/en-US/home?forum=iewebdevelopment

    Best regards


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, March 9, 2015 7:24 AM
    Moderator