HTML list item background image disappears on IE

I recently faced the problem that the background images that have been added to an HTML li tag over CSS disappeared on Internet Explorer (on Firefox and Webkit browsers everything worked fine).

What I noticed is that the problem just happens when the text is wrapped to a new line. The following figure shows when it's working correctly
and if you then decrease the size of the browser window (or on a computer with a lower screen resolution) you'll get this result
Note that the icon is missing on the last list entry. The solution is to add the "position:relative" to the ul tag, either directly or over the corresponding CSS class
<ul style="position:relative">
<li>...</li>
<li>...</li>
</ul>
Kindle

Comments

0

Your ad here?