Papa De Beau
Papa De Beau

Reputation: 3828

CSS a:Hover is messing up

I am trying to use separate CSS LINK styles on different classes. The links are messing up when I "HOVER" on the link. How can I fix this so there is not a different css style showing when I HOVER OVER the link?

Here is the CSS that is related.

.menuButton {
    display: block;
    color: #FFFFFF;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    background-image: url(../images/menuItems/Rosary-Bead-Icon.png);
    background-position: left center;
    background-repeat: no-repeat;
    padding-left: 2.7em;
    margin-left: 15px;
    float: left;
}
.menuButton a:Link ,a:Visited,a:Active, a:Hover{
    display: block;
    color: #FFFFFF;
    font-size: 1.1em;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    background-position: left center;
    background-repeat: no-repeat;
    text-decoration: none;
}

.Buttons a:Link ,a:Visited,a:Active,a:Hover{
    text-decoration: none;
    color: #FFF;
    background-image: url(../images/menuItems/buttons/largeBlueUp.png);
    height: 57px;
    width: 250px;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 1.1em;
    color: #FFF;
    text-decoration: none;
    line-height: 55px;
    background-repeat: no-repeat;
    display: block;
    text-align: center;
}

Upvotes: 0

Views: 210

Answers (1)

Jason Aller
Jason Aller

Reputation: 3652

I'm sorry I got distracted by other issues with the page. The answer is right in the code you shared:

.Buttons a:Link ,a:Visited,a:Active,a:Hover

and

.menuButton a:Link ,a:Visited,a:Active, a:Hover{

reads: - .Buttons a:Link - a:Visited - a:Active - a:Hover

Change to:

.Buttons a:Link, .Buttons a:Visited, .Buttons a:Active, .Buttons a:Hover {

and

.menuButton a:Link, .menuButton a:Visited, .menuButton a:Active, .menuButton a:Hover {

As what you were doing was applying the style to every a on hover.

Upvotes: 1

Related Questions