|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
mouseover with CSS
Hi all,
I have a question about mouseovers with CSS, I know they are doable with changing text (size, etc.), background color and background images. But, is it also possible to swap two images on mouseover that aren't backgorund images ? With images that are there instead of a text, not behind a text ? Usually I would do it with java script but it's part of a bigger assignment for school and the instructions were very clear, I'm only allowed to use html and CSS, nothing else. So if anyone could tell me if what I have in mind is even possible and if yes, how, I would be very grateful. Thanks Ephesus |
|
#2
|
||||
|
||||
|
Are you allowed to use CSS2?
|
|
#3
|
||||
|
||||
|
sure
Code:
css:
a.test .image2{
display:none;
}
a.test:hover .image1 {
display:none;
}
a.test:hover .image2 {
display:inline;
}
html:
<a class="test" href="#"><img class="image1" src="logo2.png" alt="logo2" /> <img class="image2" src="logo.png" alt="logo" /></a>
works fine in mozilla and opera, can't check in ie atm. Last edited by Akh : November 27th, 2003 at 09:21 PM. |
|
#4
|
|||
|
|||
|
khwang: Nope, I'm afraid, no CSS2.
Akh: Thanks, I will try it asap, hope it works. Thanks again. Ephesus |
|
#5
|
|||
|
|||
|
It works in Opeara, sadly it doesn't seem to work in IE, but thanks for your help anyway.
Ephesus |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > mouseover with CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|