Thursday, January 22, 2009

"Overriding" a:hover in CSS

Problem: a:hover incorporates a background color. Even though I applied a different style than a:hover to another element, its still defaulting to the background color setting in a:hover.

Solution: Create a new div element (e.g. - a id="...") and set background to transparent. Example:

a#forget:hover {
border: 0;
background-color: transparent;
}

No comments: