My challenge involves a list that is dynamically populated, and I require it to be wider than its absolutely-positioned parent (specifically a custom <select>
element implementation).
#wrapper {
position: relative;
border: 1px dashed black;
width: 300px;
margin: 0 auto;
}
#testContainer {
display: inline-flex;
position: absolute;
right: 0px;
background-color: fuchsia;
list-style: none;
padding: 0;
border: 5px dashed orange;
}
#testLabel {
width: 300px;
background-color: yellow;
}
.testItem {
width: 200px;
height: 50px;
background-color: #aaa;
}
<div id="wrapper">
<div id="testLabel">label</div>
<ul id="testContainer">
<li class="testItem">aaaaaaaaaaaaaaaaaaaaaaaaaaapppppppppp</li>
<li class="testItem">www</li>
<li class="testItem">cccccccccccccccccc</li>
</ul>
</div>
The layout works perfectly in most browsers (as seen in screenshot 1) except for Internet Explorer 11 (as shown in screenshot 2). How can I overcome this issue? Please refer to the following Codepen link for more information: https://codepen.io/montrealist/pen/VrrYem