views:

175

answers:

2

I have an issue in IE6 but not IE>=7, FF or Chrome. It is caused when you wrap an anchor tag with a span.

<span><a href="place"><span>Text</span></a></span>

However this works:

<h1><a href="place"><span>Text</span></a></h1>

The only styling on them is as below:

div#headeraffiliate a.skin_3 {
    width: 550px !important; height: 53px !important;
    background: transparent url('images/logo_skin3.gif') top left no-repeat !important;
}

div#header a#logo span,
div#headeraffiliate a#logo span {position: absolute; margin-left: -1000em;}

div#header a#logo,
div#headeraffiliate a#logo {
    display: block;
    width: 297px; height: 69px;
    z-index: 1000;
    position: absolute; left:0; bottom:0;
    background: transparent url('images/logo.gif') top left no-repeat;
}
+1  A: 

I believe the difference here is a H1 tag is a block level element where as a span is an inline element. It may work if you use <span style="display:block">

John Hartsock
Thanks this fixed it perfectly. I actually added the linediv#header div#headeraffiliate span { display: block; }. I know this affects all spans, but seems to work fine.
tgandrews
A: 

I would suspect this is the cause:

div#headeraffiliate a#logo span {position: absolute; margin-left: -1000em;}

It is positioning your link off-screen.

Diodeus
Surely, that should just be positioning the span internal span and not the anchor.
tgandrews