html - How to ignore rule for a href using CSS -


i have simple rule form <a>:

a:link {     text-decoration: none; }  a:visited {     text-decoration: none; }  a:hover {     text-decoration: underline; }  a:active {     text-decoration: underline; } 

but don't want apply <img> inside <a>:

<a href="link">      <img class="myclass" src="smile.png" alt="this image link example"> </a> 

how can ignore this?

you need add set of classes after first, targeting img, img:hover, etc. however, img element doesn't support text-decoration. trying avoid image?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -