html - Hover not working inside an tag -



html - Hover not working inside an <a href> tag -

i'm new html/css excuse me if simple question a:hover (using id , not class) isn't working within href tag when utilize in th tag does.

html

<a href='http://www.example.com' id='link1'>example text</a>

css

#link1 a:hover { text-decoration: none; color: #e0e0e0; }

the thing if set in div , set class instead of id, works moves rest of links afterward downwards line on page.

that's because you're trying find anchor link within id 'link1' while link1 anchor link. seek this:

a#link1:hover { text-decoration: none; color: #e0e0e0; }

http://jsfiddle.net/kf8ey/

html class href

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -