I'm not better at CSS. I have to change the font color after a certain tag. For instance.
<div class='showContent'>
<ul>
<li><span style='color:green;'><strong>Advantages</strong</span><strong>my title :</strong> My message </li> <!-- i should not change this because <strong> tag is not next to <li> tag , here <span> tag comes next to <li> -->
<li><strong>my title :</strong> My message </li> <!-- i should change this title <strong> tag color because this comes next to <li> tag -->
<li><strong>My title1 : </strong> My message my message <strong>My message in bold</strong> my message again </li>
<li><span style='color:red;'>Disadvantages</span><strong>my title :</strong> My message </li>
<li><strong>My title1 : </strong> My message my message <strong><a href=''>My message in bold</a></strong> my message again </li>
</ul>
</div>
So, what is my requirement, I have to change everything '<strong>my title</strong>'to some color, only the following <li> tagsNot in other places
So I wrote in css
.showContent li strong:first-line
{
color : blue;
}
but he does not change.
source
share