Css Mouseover images...?

Get Help With All Aspects of Web Design & Design Software

Moderators: Moderator, Global Moderator

Post Reply
us3rX
Hero Member
Hero Member
Posts: 1194
Joined: Thu May 06, 2004 6:11 am

Css Mouseover images...?

Post by us3rX »

Reasons for posting,

javascript = is being a pain
Google = Not helping for mouseover css images...

So i was wondering if its possible, Like if i have blah.gif and when you mouseover it, it should change to blah-over.gif but nooooooooo doesnt want to work that way... so any of you css people out there... give me a hand? o.0

Thanks,
us3rX <img src=\'http://www.killanet.net/forum3/public/s ... /ph34r.gif\' class=\'bbc_emoticon\' alt=\':ph34r:\' />
[align=center]

Image

"Time is never wasted, when your wasted all the time" ~ Radio Dj/Unknown Source

"Death is the inevitable end to the suffering of the living." ~Unknown

"You were born an original. Don't die a copy" ~Murdoc Niccals

[/align]
Scott
Administrator
Administrator
Posts: 1651
Joined: Sun Apr 25, 2004 1:08 pm

Css Mouseover images...?

Post by Scott »

This will work for background images. For normal images you\'ll need to use javascript. [html]<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>

<style type=\"text/css\">
/*<![CDATA[*/
.img { background-image: url(normal.gif); }
.img:hover { background-image: url(hover.gif) }
/*]]>*/
</style>
<title></title>
</head>
<body>
<div class=\"img\">Bleh</div>
</body>
</html>[/html]
Post Reply

Return to “Web Design Principles”