View Single Post
  #1 (permalink)  
Old Oct 27th, 2004, 19:00
MickAv8r MickAv8r is offline
New Member
Join Date: Oct 2004
Location: USA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Strange MSIE hover bug?

Haven't seen this discussed before...link hovers work fine in MSIE 6 however whenever I wrap the link in a div or span to specifiy where I want it to be the linkhover effect goes poof but still works in Mozilla.

Code: Select all
/* Style from external stylesheet */

.link { text-decoration: none;	color: #CCCCCC; }
.link:visited { color: #CCCCCC; }
.link:hover { color: #4E4E4E; }

.mainbody {
     position: absolute;
     top: 50px;
     left:  50px;
}

.linkpos {
     position: absolute;
     top: 100px;
     right: 30%;
}
Code: Select all
// HTML this works as desired in MSIE 6 but has no position attributes

<a class="link" href="http://www.someurl.com>This is a Link</a>

Code: Select all
// HTML this has position attributes but does not work at all.
<span class="linkpos"><a class="link" href="http://www.someurl.com>This is a Link</a></span>
however when I use a linkhover affect on a link used inline with normal text that may have position and style attributes applied to it it works.

Code: Select all
// HTML This hover affect works in MSIE 6

<div class="mainbody">
Some random text blah blah blah blah blah <a class="link" href="http://www.someurl.com>Click on this Link</a> Some more random text blah blah blah blah.
</div>
This all works in Firefox or Mozilla or Opera etc - am I smoking crack? why does this fail with MSIE?