Label tag not clickable if a child of hyperlink

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
cohq82
Forum Commoner
Posts: 43
Joined: Mon Apr 21, 2008 8:38 pm

Label tag not clickable if a child of hyperlink

Post by cohq82 »

I have an HTML structure like this
<a href="/abcd">
<img src="aa.gif">
<label>click me</label>
<img src="bb.gif">
</a>

There is a reason to do it like that. I want to whole group clickable and go to /abcd

However it works in Firefox but not in Internet Explorer. In IE, if I click on the area where the <label> is, it does not work. The img tag is fine. Can you help? Thanks
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Label tag not clickable if a child of hyperlink

Post by kaszu »

Try setting

Code: Select all

display: inline-block;
for <a>
Please provide CSS if that doesn't work.
Post Reply