...

View Full Version : mouseover in css



kenzor
10-28-2007, 03:31 PM
Hello, i want to make mouseover in a picture. so if I move my mouse over the picture the picture should change and when i move it out, it should be the old one again.

here is the code:

}
div#header_plan1{
width: 389px;
height: 68px;
background: url(../images/header_plan1.jpg);
background-repeat: no-repeat;
float: left;
cursor: pointer;
position: relative;

rams1703
10-28-2007, 03:48 PM
div#header_plan1:hover{
background: url(../images/header_plan1.jpg);
}

but this wont work in IE :(

you must use <a href="#"></a> tag to make it work in IE

gud luck,
rams

kenzor
10-28-2007, 04:18 PM
ok and how to add it there?

here is the php code:


</div>
<div id="header_plandiv">
<!-- you can set the URL for each plan through the wr_config.php file -->
<div id="header_plan1" onclick="location.href='<?php echo $header_plan1 ?>';"></div>

<div id="header_plan2" onclick="location.href='<?php echo $header_plan2 ?>';"></div>
<div id="header_plan3" onclick="location.href='<?php echo $header_plan3 ?>';"></div>

jlhaslip
10-28-2007, 05:02 PM
might need to wander over to the javascript section with this one

bettytech
10-29-2007, 01:10 PM
Try this code you will able to do the things you want

<a href="required page"
onmouseover="alert('An onMouseOver event');return false">
<img src="required image" width="100" height="30">
</a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum