No replies
rateforsuccess
rateforsuccess's picture
Offline
newbie
Last seen: 4 weeks 5 days ago
Timezone: GMT-5
Joined: 2019-11-03
Posts: 1
Points: 2

I have a way of highlighting text. I position a red box with z-index of -2 where the text should be. This usually works, but not when there is a span element around the text, with an attribute such as: style="background-color:#ffffff". It seem in this case that the red box is covered up. Here is the actual HTML that does not work:

  <article id="ArticleToHighlightRFS">
 
                    <div id="RFSkid1_DIV"><span id="RFSkid2_SPAN" style="background-color:#ffffff;"><br id="RFSkid3_BR">Elizabeth Warren <br id="RFSkid4_BR">United States senator<br id="RFSkid5_BR">Written By: Jeff Wallenfeldt </span></div>
<div id="RFSkid6_DIV"><span id="RFSkid7_SPAN" style="background-color:#ffffff;">Alternative Title: Elizabeth Herring<br id="RFSkid8_BR">Elizabeth Warren, née Elizabeth Herring, (born June 22, 1949, Oklahoma City, Oklahoma, U.S.), American legal scholar and politician who was elected as a Democrat to the U.S. Senate in 2012 and began representing Massachusetts in that body the following year. </span></div>
                </article>
            <div class="RedBorderedHighlight" style="left: 298px; top: 722px; width: 150px; height: 21px;">&nbsp;</div><div class="RedBorderedHighlight" style="left: 600px; top: 684px; width: 194px; height: 21px;">&nbsp;</div><div class="RedBorderedHighlight" style="left: 631px; top: 228px; width: 49px; height: 21px;">&nbsp;</div><div class="RedBorderedHighlight" style="left: 330px; top: 228px; width: 95px; height: 21px;">&nbsp;</div><div class="RedBorderedHighlight" style="left: 237px; top: 152px; width: 85px; height: 21px;">&nbsp;</div><div class="RedBorderedHighlight" style="left: 225px; top: 76px; width: 64px; height: 21px;">&nbsp;</div></div>

If one red box is under the first instance of the name 'Herring', I can't see it at all because of the white background. One solution might be to just get rid of all backgrounds, but is there another method?