Reputation: 131
I have a weird problem with IE11(works in chrome and edge), in certain situations the background-color hides the text above it, trying to find out an update to IE11 to fix it, if exists(company computers, due to certain limitations cant use enterprise mode and cant update all users to win10, also can't fix the html since its generated from outlook outside the company) here is the most simplified version
<p style="direction: rtl;">
<span dir="LTR" style="color: black; background-color: yellow;">Why Am I Yellow</span>
</p>
If anyone can help find a fix, or maybe even an IE11 version where it works it will be appreciated.
Upvotes: 11
Views: 1819
Reputation: 11335
As you had mentioned in your question that HTML is generated from Outlook from outside your organization so modifying the HTML is not an option for you.
I try to make a test with your code in IE 11 and I am able to produce the issue.
I know your users are not able use the Enterprise mode. If they can add this site to Compatibility view manually than it can fix this issue.
Please check the testing result below.
Upvotes: 0
Reputation: 272762
Making the span inline-block
seems to fix the issue on my IE11 (version 11.0.9600.19267)
<p style="direction: rtl;">
<span dir="LTR" style="color: black; background-color: yellow; display: inline-block;">Why Am I Yellow</span>
</p>
Upvotes: 6