aj_nsc
11-21-2009, 09:20 PM
Here's my HTML:
<ul>
<li class="user"><a title="Click to display logged events for this session" href="#"> </a>stuff here</li>
<li class="time">stuff here</li>
<li class="time">stuff here</li>
<li class="ip">stuff here</li>
</ul>
and the relevant CSS:
ul { position: relative; }
ul a { position: absolute; display: block; width: 100%; height: 100%; z-index: 10; }
All the LI's are floated left to make a row (not shown in the CSS) and I want to make the entire row clickable so I figured I'd absolutely position an anchor which is the entire width and height of the row....works great in FF, Opera, Safari, and Chrome. But in IE7/8, the entire row is clickable except for the text nodes ("stuff here").
I realize there's no real point for the z-index declaration in the above css, but I was just trying random things at the point when I came up with it - it never helped. Does anyone know how to achieve this effect without putting the content in each li in separate <a> tags in addition to my absolutely positioned anchor?
<ul>
<li class="user"><a title="Click to display logged events for this session" href="#"> </a>stuff here</li>
<li class="time">stuff here</li>
<li class="time">stuff here</li>
<li class="ip">stuff here</li>
</ul>
and the relevant CSS:
ul { position: relative; }
ul a { position: absolute; display: block; width: 100%; height: 100%; z-index: 10; }
All the LI's are floated left to make a row (not shown in the CSS) and I want to make the entire row clickable so I figured I'd absolutely position an anchor which is the entire width and height of the row....works great in FF, Opera, Safari, and Chrome. But in IE7/8, the entire row is clickable except for the text nodes ("stuff here").
I realize there's no real point for the z-index declaration in the above css, but I was just trying random things at the point when I came up with it - it never helped. Does anyone know how to achieve this effect without putting the content in each li in separate <a> tags in addition to my absolutely positioned anchor?