Ah well spotted I didn’t notice that - I thought it had been fixed:)
It can easily be fixed by addressing the anchor on li:hover and not a:hover.
e.g.
#header ul li:hover, #header ul li.current_page_item {
background: #fff url('images/menu_button.jpg') right top no-repeat;
color: #fff;
}[B]
#header ul li:hover a[/B], #header ul li.current_page_item a {
background: #fff url('images/menu_button.jpg') left top no-repeat;
color: #fff;
}
That ensures that both ends light up at once
As mentioned above if Ie6 support is required then an element would need to be nested inside the anchor and then change the styles from li:hover to affect a:hover and a:hover span instead.
Multiple backgrounds are ALREADY available is CSS3 ( just separate each url() with commas) however this create all sort of older browser compatibility issues. Still you might want to google some tutorials on CSS3 backgrounds.
having a quick look at your code ( and teh fact that your site works fine on FF and Safari on mac) I figured your problem comes from the fact that you used an li:hover and IE<8 doesn’t recognize hover on anything but <a> tags. Yup IE sucks. To add support for IE you need to restructure your code. Yup IE sucks.
change this : #header ul li:hover, #header ul li.current_page_item
to this: #header ul li a span,#header ul li a{display:block;}/* you’ll have to a’djust the padding here*/ #header ul li a:hover span, #header ul li.current_page_item {…}
and wrap a span around your anchor, like this:
<li id=“menu-item-75” class=“menu-item menu-item-type-post_type menu-item-75”><a href=“http://www.donerhorsley.ca/about/”><SPAN>About Us</SPAN></a></li>
hope this helps
<li id=“menu-item-75” class=“menu-item menu-item-type-post_type menu-item-75”><a href=“http://www.donerhorsley.ca/about/”>About Us</a></li>
Code snippets would be helpful… The menu on the live site looks fine to me, unless you are replacing that with this new snippet you need help with. It’s kind of hard to see what you need help with at this point.
lol - I miss a lot of things but luckily people don’t notice (Your posts have usually been spot on anyway;))
Yes that’s css3pie is quite useful although I haven’t used it in real projects. I think that maybe when IE9 up and running and has a decent share I might think about using it for the older IE versions.
I think it’s to do with the right margin on the <a>. Essentially, once you move your mouse into the zone where you are outside the <a> but inside the <li>, you will be picking up the li:hover (which gives the right hand side effect) but not the a:hover (which would give the left hand side effect).
You should be able to solve this by getting rid of the margin-right on the <a>, and using padding-right if you need to. That way, the <a> will take up exactly the same space as the <li>, and so you will always get both :hover effects at exactly the same time.
Yes hover works in IE7 on elements other than anchors but does occasionally suffer from a similar bug to IE6 with almost the same fix being needed. They both need a rule that address the hovered element first.