/    Sign up×
Community /Pin to ProfileBookmark

Navigation CSS

Hello,

I have two navigation graphic with the same text but different color on one.
With 5 links but on the other graphic it has a background color with the
text. So when it is rollover on one of the link it just changes.

How can I manage to create that in css?

Thanks

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 23.2005 — <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>css Image rollover</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
#menu a {
display:block;
width:5em;
height:2em;
background:#ccc url(img1.gif) no-repeat;
}
#menu a:hover {
background:#ccc url(img2.gif) no-repeat;
}
-->
</style>

</head>
<body>
<ul id="menu">
<li><a href="#">link</a></li>
</ul>
</body>
</html>

btw: if it's just the background color that changes, make a transparent image and change the background color on rollover.
×

Success!

Help @homeboy 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 5.24,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...