开发者

IE8 - Problem with Hyperlink that wraps image and div

开发者 https://www.devze.com 2023-01-22 16:36 出处:网络
Im having issues with the following HTML in IE8: <div class=\"inner\"> <a href=\"google.com\" target=\"_self\">

Im having issues with the following HTML in IE8:

<div class="inner">
    <a href="google.com" target="_self">
        <div class="lozbutton">
            <img alt="OPENHIVE Survey" src="http://url.com/product" />
        </div>
        <div class="description">&nbsp;</div>
    </a>
</div>

When clicking on the .description div the hyperlink works, however when ever I click on the <img> the link doesnt work.

Can anyone suggest ho开发者_如何转开发w I can make both the <img> and the .description div link to the same place? either HTML fix or jQuery fix.


the only way I've found to have this work in IE8 or IE9 is to add an HTML5 doctype declaration to the top of the file:

<!doctype html>

This causes the browser to interpret the file as HTML5, in which case it behaves appropriately.

0

精彩评论

暂无评论...
验证码 换一张
取 消