/    Sign up×
Community /Pin to ProfileBookmark

CSS Rollover Image not working

The image I created (110px x 166px) that I want the top half 110×83 showing and on hover, have the bottom half of the image showing. For some reason, I cannot get this to work and i’m sure its just something very simple that i’m missing. Any help is appreciated.

CSS

[CODE]@charset “utf-8”;
/* CSS Document */

#escapes
{

height:83px;
width:110px;
background: url(Board_Images/Escapes.png);
}

#escapes:hover
{
background-position: 0px -83px;
background:url(Board_Images/Escapes.png);
}
[/CODE]

and the HTML

[CODE]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>

<link href=”common.css” rel=”stylesheet” type=”text/css” />
<style type=”text/css”>
@import(“file:///C|/Users/Desktop/ACE Board 2/common.css”);
</style>

</head>

<a id=”escapes” style=”position: absolute; left: 610px; top: 80px; href=”http://www.google.com”></a>

<body>

</body>
</html>
[/CODE]

Goal: Create an image that when the mouse rolls over, it changes so that the user knows they can click on it to a specified link.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@skywalker2208Feb 21.2010 — Can you attach the image?
Copy linkTweet thisAlerts:
@playa4real1authorFeb 21.2010 — Sure.

The image:

[IMG]http://i261.photobucket.com/albums/ii64/playa4real1/Escapes.png[/IMG]


Also, by accident I left out the end quote, here it is fixed:
[CODE]<a id="escapes" style="position: absolute; left: 610px; top: 80px;" href="http://www.google.com"></a>
[/CODE]
×

Success!

Help @playa4real1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...