arkster
09-26-2007, 10:53 PM
I have an image that combines normal, mouseover, and active. Using a DIV I hide most of the image to only show a portion of the image. Then during :hover I want the position to change to the highlighted portion of my image. Using negative positoning technique.
The code I have implemented works flawlessly in FF. But IE will not budge, could anyone please provide some insight?
Here are my divs:
<div class="menubar" id="menu_loose">
<a href="" id="img_menu_loose">
<img src="/images/top_menubar.gif" />
</a>
</div>
<div class="menubar" id="menu_rings">
<a href="">
<img src="/images/top_menubar.gif" id="img_menu_rings" />
</a>
</div>
Here is my css:
#menu_loose
{ width:131px; position:relative;}
#img_menu_loose img, #img_menu_loose:visited img
{ position:absolute; top:-0px; left:0px; }
#img_menu_loose:hover img, #img_menu_loose:visited:hover img
{ position:absolute; top:-24px; left:0px; }
#img_menu_loose:active
{ position:absolute; top:-48px; left:0px; }
#menu_rings
{ width:53px; }
#img_menu_rings
{ position:absolute; top:0px; left:-131px; }
#img_menu_rings:hover
{ position:absolute; top:-24px; left:-131px; }
#img_menu_rings:active
{ position:absolute; top:-48px; left:-131px; }
I have tried two different ways of trying to get IE to work. One way is setting the css to point to the anchor tag, and another directly on the image. Both work in FF, but neither in IE.
The code I have implemented works flawlessly in FF. But IE will not budge, could anyone please provide some insight?
Here are my divs:
<div class="menubar" id="menu_loose">
<a href="" id="img_menu_loose">
<img src="/images/top_menubar.gif" />
</a>
</div>
<div class="menubar" id="menu_rings">
<a href="">
<img src="/images/top_menubar.gif" id="img_menu_rings" />
</a>
</div>
Here is my css:
#menu_loose
{ width:131px; position:relative;}
#img_menu_loose img, #img_menu_loose:visited img
{ position:absolute; top:-0px; left:0px; }
#img_menu_loose:hover img, #img_menu_loose:visited:hover img
{ position:absolute; top:-24px; left:0px; }
#img_menu_loose:active
{ position:absolute; top:-48px; left:0px; }
#menu_rings
{ width:53px; }
#img_menu_rings
{ position:absolute; top:0px; left:-131px; }
#img_menu_rings:hover
{ position:absolute; top:-24px; left:-131px; }
#img_menu_rings:active
{ position:absolute; top:-48px; left:-131px; }
I have tried two different ways of trying to get IE to work. One way is setting the css to point to the anchor tag, and another directly on the image. Both work in FF, but neither in IE.