learning_bee15 learning_bee15 - 2 months ago 10
CSS Question

Text decoration none not working

I am trying to have text decoration:none for the spans listed under anchor tag. When other styles are working, this particular style is not working. Am I missing something ?



a * {
color: grey;
font-weight: bold;
font-size: 2em;
text-decoration: none !important;
}

<ul>
<li>Lorem ipsum dolorsit amet, consectetur adipiscing elit.</li>
<li><a href="">Lorem <span>ipsum</span> dolor sit amet, <dolphia>consectetur</dolphia> adipiscing elit.</a>
</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><a href=""><span>Lorem ipsum</span> dolor sit amet, <span>consectetur</span> adipiscing elit.</a>
</li>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li><a href=""><span>Lorem ipsum dolor sit amet</span>, consectetur adipiscing

elit.</a>
</li>
</ul>




Answer

a *{
  text-decoration: none;
  display: inline-block;
}
<a href="">Hello<span>world!</span></a>

Comments