I need to target an h1 tag that has this attribute: style=color:#230870
and apply a text-shadow. It works great, except in IE of course. Sample code I've found seem to work but my code is using the '#' and in IE it gets rendered as: style="color: rgb(35, 8, 112);
in the H1.
#mydiv h1[style*=red] {
text-shadow: 2px 2px 5px #443E55;
}
#mydiv h2[style*=70] {
text-shadow: 2px 2px 1px #ffcc00;
}
#mydiv h2[style*=rgb] {
text-shadow: 2px 2px 1px #ffcc00;
}
<div id="mydiv">
<h1>THIS IS A REGULAR H1 TAG</h1>
<h1 style="color:red">THIS IS H1 WITH "red" AS IT'S ATTRIBUTE VALUE AND A DROP SHADOW</h1>
<h1 style="color:#230870">THIS H1 WITH BLUE #230870 CSS ATTRIBUE VALUE WITH A DROP SHADOW</h1>
<h1 style="color: rgb(35, 8, 112);">THIS H1 WITH BLUE #230870 BUT IE RENDERS THE ATTRIBUTE as: 'style="color: rgb(35, 8, 112)'</h1>
</div>
What am I doing wrong?
The CSS would target each one, with different color shadow, pending on what is selected in the CMS. I can't target just the 'rgb' in the code as the wrong shadow could be used. Sorry if that wasn't clear in the beginning. (Newbie at writing questions)
` elements. You should have only 1 per page. Even if you can't edit the h1 element itself (which I'm certain you can) you can still target the h1 with the other element identifiers; `#mydiv h1` but really why not just `h1 { my styles...}`?
– Seth Warburton Jun 09 '17 at 10:13THIS H2 HAS style="color: rgb(35, 8, 112)
– JPFotoz Jun 09 '17 at 13:51