Forums
View unanswered posts | View active topics It is currently Thu Oct 23, 2014 9:48 am



Reply to topic  [ 4 posts ] 
 span inside link doesn't get the :hover state on IE7&8 
Author Message

Joined: Tue Feb 01, 2011 6:54 am
Posts: 6
Post span inside link doesn't get the :hover state on IE7&8
This happens multiple times on a page => same pattern.

when I have a span inside link & make a:hover on css, it seems that the span doesn't get the :hover (unless I hover exactly on top of the span) on IE7&8. I tried zoom, position, float none, etc but seems like nothing works.. any idea?
Code:
<nav id="mainnav">
            <ul>
              <li class="active">
                <a href="/doctor/patients" linkindex="4">Vault
                <span class="badge">666</span>
                </a>
              </li>
            </ul>
</nav>

CSS:
Code:
#mainnav li.active a:hover span.badge {
  color: white;
  background: #929292;
}


Tue Feb 01, 2011 7:01 am
Profile

Joined: Tue Feb 01, 2011 6:54 am
Posts: 6
Post Re: span inside link doesn't get the :hover state on IE7&8
FIXED!!!

If you guys ever run to this, just define padding on the span on hover state, so:
Code:
#mainnav a:hover span.badge {
  color: #079afa;
  background-color: white;
// Define padding on hover state - make sure the bottom padding is NOT 0(zero) - try 5px equal padding first just to make sure
  padding: 1px 5px 1px;
}


Tue Feb 01, 2011 7:11 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post Re: span inside link doesn't get the :hover state on IE7&8
Not sure why the padding worked, but this sounds like the limitation for which -pie-watch-ancestors was created: http://css3pie.com/documentation/suppor ... -ancestors


Tue Feb 01, 2011 9:24 am
Profile

Joined: Tue Feb 01, 2011 6:54 am
Posts: 6
Post Re: span inside link doesn't get the :hover state on IE7&8
Can you please help me solving this one?
viewtopic.php?f=3&t=448

It fixed by using either height: 1% or height: auto but it causes different result on IE7 & 8 & FF. thoughts?


Tue Feb 01, 2011 9:34 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.