I've been trying to find some details on how to create a rollover image using CSS but just about everything I come across involves an anchor link and is in a div.
I suppose I'll be told that's how its done, but here's my conundrum.
I have a fixed size div (350 x 300) which is defined in the stylesheet.
I currently have an image loaded into this div within the HTML page (rather than a background image in the stylesheet).
What I want is when the user rolls the mouse over the image, it changes to another image. So I don'r want/need a link, just a rollover.
Here's my stylesheet:
And here's my page code:
As you can see, I'm pulling information into this div from a database because the site user wants to update the images from time to time.
Is there any quick way of doing this?
I suppose I'll be told that's how its done, but here's my conundrum.
I have a fixed size div (350 x 300) which is defined in the stylesheet.
I currently have an image loaded into this div within the HTML page (rather than a background image in the stylesheet).
What I want is when the user rolls the mouse over the image, it changes to another image. So I don'r want/need a link, just a rollover.
Here's my stylesheet:
Code:
.workbox1 {
float: left;
width: 350px;
height: 300px;
background-color: #EEEEEE;
margin-right: 5px;
margin-bottom: 5px;
}
Code:
<div class="workbox1">
<img src="./images/home/<?php echo $workbox1image; ?>" alt="<?php echo $workbox1imagealt; ?>" border="0">
</div>
Is there any quick way of doing this?