Older versions of IE do not understand inline-block for block-level elements.
The reason inline-block works for inline elements is because they did this to invoke hasLayout . And the layout for inline elements works exactly the same as inline-block .
So, to make inline-block work with block-level elements, make them inline and somehow call hasLayout , for example, using zoom: 1 .
So, for your code, there are two ways: change the div to span s or add inline hacks (or move the code to external style sheets and use conditional comments). The version with built-in hacks will look like this:
<div style='width: 200px; border: 1px solid black;'> <div style='display: inline-block; width: 70px; border: 1px solid green;*display:inline;zoom:1;'> asdfasdf<br />asdf </div> <div style='display: inline-block; width: 70px; border: 1px solid green;*display:inline;zoom:1;'> asdfasdf<br />were </div> </div>
kizu 01 Oct 2018-11-11T00: 00Z
source share