Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rollover effect for a non-link image 1

Status
Not open for further replies.

DrySnot

Technical User
Nov 29, 2007
46
I have a logo on my page and i'm trying to make it rollover on mouseover.

This is my code
Code:
/** LOGO */

#logo {
	float: left;
	width: 396px;
	height: 212px;
	background: url(../images/homepage01.gif) no-repeat left top;
}


I have tried messing around with this but I'm not adding it in right.

Code:
a:link, a:visited{
display:block;
width:396 px;
height:212 px;
background:url(../images/homepage01.gif);
}
a:active, a:hover{
background:url(../images/homepage01.gif);
display:block;
width:396 px;
height:212 px;
}



Thanks so much for the advice
 
If its not a link the how do you expect a:hover to apply to it.

you'd need to apply the hover class directly to your image style. #logo:hover{...}


However if its not a link, then Internet Explorer will ignore the hover pseudo class.

You'd have to use Javascript, and an Onmouseover event to accomplish what you want in IE6.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks so much for letting me know that. I think I'll just leave it like it is then.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top