Hello,
I'm having a problem with the css hover effect in IE. I have an <a>
tag with the following CSS:
a.subNavItem {
display:block;
color:#464645;
padding:2px 7px 4px 6px;
font-family:verdana, arial,helvetica ,sans-serif;
font-size:9px;
font-weight:bold;
text-decoration:none ;
width:inherit;
border-bottom:1px solid #C8CBC7;
white-space:nowrap;
}
The width of the <atag inherits from its parent div so that the
border and hover effect will span across the entire div.
Here's the hover css:
a.subNavItem:ho ver
{
color:#00A5E5;
text-decoration:none ;
background-color:#F5F8F4;
}
Here is the HTML:
<div style="width:40 0px">
<a href="dir" class="subNavIt em">click</a>
</div>
THE PROBLEM:
In IE, the hover effect only works when I mouse over the text itself.
So even though the <atag is 400px wide, the hover only works if you
mouse over "click". In Firefox, I can mouse over anywhere inside the
<atag that spans across the width of the div, and my hover changes
work fine. I don't want to change all of my <atags to <div>.
Does anyone know a solution to this?
I'm having a problem with the css hover effect in IE. I have an <a>
tag with the following CSS:
a.subNavItem {
display:block;
color:#464645;
padding:2px 7px 4px 6px;
font-family:verdana, arial,helvetica ,sans-serif;
font-size:9px;
font-weight:bold;
text-decoration:none ;
width:inherit;
border-bottom:1px solid #C8CBC7;
white-space:nowrap;
}
The width of the <atag inherits from its parent div so that the
border and hover effect will span across the entire div.
Here's the hover css:
a.subNavItem:ho ver
{
color:#00A5E5;
text-decoration:none ;
background-color:#F5F8F4;
}
Here is the HTML:
<div style="width:40 0px">
<a href="dir" class="subNavIt em">click</a>
</div>
THE PROBLEM:
In IE, the hover effect only works when I mouse over the text itself.
So even though the <atag is 400px wide, the hover only works if you
mouse over "click". In Firefox, I can mouse over anywhere inside the
<atag that spans across the width of the div, and my hover changes
work fine. I don't want to change all of my <atags to <div>.
Does anyone know a solution to this?
Comment