user3105641
user3105641

Reputation: 3

How do I change a button on hover?

I need help to create a image change when hovered over. I am using this image as a button. This is my code:

.button_home {
    width: 110px;
    height: 50px;
    background-image: url(background1.png);
}
.button_home :hover {
    background-image: url(background_ov1.png);
}

my html is:

<form action="webpage.HTML">
<input type="image" class="button_home">
</form>

Any help please?

Upvotes: 0

Views: 40

Answers (1)

John Conde
John Conde

Reputation: 219804

Get rid of the space before :hover

.button_home:hover {

Upvotes: 4

Related Questions