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

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -