Our CSS Style topics:
CSS Code Tutorial Chapters:
|
Cascading Style Sheets: an Interactive Tutorial
CSS: CSS Links, < a > and HoverChapter 6 part 2 (of 2)
So you've seen a terrible way to use hover, and a pretty good way to use hover. The three most common ways people use hover are as follows:
So this should be simple enough. To add an underline, your style could look like this:
a:link { text-decoration: none; } To remove an underline, your style could look like this:
a:link { text-decoration: underline; } To change the background-color, simply add it inside :hover (and :active if you'd like):
a:link { text-decoration: underline; } Want to test your skills? Try making a link that is red without an underline before it is clicked, and blue with an underline when the mouse hovers it. (Remember underline is a text-decoration from the text chapter.) Click here if you get stuck or if you want to see how I did it.
Our Hosting Partners (Sponsored Ads):
iPage Hosting 1&1 Hosting $6.99/mo Free Domain Name If you Order Today! |
Copyright © Dave Kristula. All Rights reserved.