|
About the Internet About Web Browsers Why Domain Names HTML vs XHTML Making Webpage Files Naming Webpage Files About HTML Tags Basic HTML Page DTDs and Doctype Tags Spaces and New Lines Special Characters Bold, Italics, More Writing Headlines Adding Links Making Lists Comments in HTML How to Add Images Sources of Images Image File Formats Optimizing Images Color in HTML & CSS "Web-safe" Color Chart Making Tables Formatting with Tables Making Forms Using Imagemaps Using Frames Meta Tags Promoting Your Site How-To's Homepage Links |
Using CSS to format LinksRemoving underlinesAs CSS has become popular many sites have gotten rid of the underlines under their links, relying on colors or other factors to set their links apart. To make links not be underlined use : Changing colors on MouseoverThis trick works in IE5+ and Netscape 6. It won't work in Netscape 4. Define different "pseudo-classes" for the different link states link, hover, and visited. For example:
To have different styles of links within a page you can combine a link style with a class style. (You can do this with other tag types also.) It works best to specify the class in the <a> tag, before the href attribute for example: Specify it in the style section or style sheet like this: a:visited.navlink { color:#9900cc } a:hover.navlink { color:#990000 } |


