|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Pure CSS "image replacement"
ok, so it's not exactly image swapping, but i'm trying to get this thing to work in Firefox (works in IE). My xhtml is as follows:
Code:
<div class="foot"> <img src="images/menubase.jpg" alt="see | hear | speak" /> <a href="#" id="menu_see"> </a> <a href="#" id="menu_speak"> </a> <a href="#" id="menu_hear"> </a> And the CSS: Code:
a#menu_see {
position: absolute;
left: 50%;
top: 0px;
width: 66px;
height: 44px;
margin-left: -105px;
background: url(../images/holderMenuSee.gif) no-repeat fixed right top;
}
a#menu_see:hover {
background: url(../images/menuSee.jpg) no-repeat fixed right top;
}
a#menu_speak {
position: absolute;
left: 50%;
top: 0px;
width: 74px;
height: 44px;
margin-left: -37px;
background: url(../images/holderMenuSpeak.gif) no-repeat fixed right top;
}
a#menu_speak:hover {
background: url(../images/menuSpeak.jpg) no-repeat fixed right top;
}
a#menu_hear {
position: absolute;
left: 50%;
top:0px;
width:61px;
height: 44px;
margin-left: 40px;
background: url(../images/holderMenuHear.gif) no-repeat fixed right top;
}
a#menu_hear:hover {
background: url(../images/menuHear.jpg) no-repeat fixed right top;
}
the page is located [ here ] |
|
#2
|
||||
|
||||
|
Are they suppose to be GIFs and JPGs, and not just one or the other? I wouldn't think it would work in IE if that was wrong, but I thought I'd ask anyway.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
||||
|
||||
|
just remove 'fixed' from the background properties.
|
|
#4
|
||||
|
||||
|
Quote:
now, why did i add that? haha. thanks akh. now comes the positioning problem. for some reason, it's fine in Firefox, but everything is off to the right about 3 pixels in IE now. |
|
#5
|
||||
|
||||
|
actually, now that you've mentioned it, i made the a#menu.. default state background a .gif simply because i wanted the image the links were laid over to be seen. I figured that'd be an easier way to do image swapping, rather than rely on js.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Pure CSS "image replacement" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|