锚标记在IE7中不起作用

时间:2013-11-19 11:40:15

标签: html css

我面临一个奇怪的问题。问题是单击嵌套在锚标记内的图像不会进入其href链接。在IE7中发生此问题。

我的HTML代码如下。

<div id="shop">
        <article>
            <figure class="visual">
                <a href="/de/index.php?section=shop&amp;catId=17">
                    <div class="categorie-image-wrapper">
                        <img border="0" src="http://shop.jci.ch/images/shop/butcher-lg.jpg.thumb">
                    </div>
                    <h3>Flyer, Medienmappe, Jahresbericht</h3>
                </a>
            </figure>
        </article>
    </div>

我的CSS样式:

article, figure {
            display: block;
        }
        #shop  a {
            border: 1px solid #0A85C8;
            cursor: pointer;
            display: block;
            float: left;
            margin: 0 17px 32px 0;
            width: 230px;
            text-decoration: none;
        }
        .categorie-image-wrapper {
            float: left;
            height: 150px;
            padding: 5%;
            text-align: center;
            width: 90%;
        }
        img {
            max-height: 80%;
            max-width: 80%;
            padding: 10%;
        }
        #shop a h3 {
            background: none repeat scroll 0 0 #0097D6;
            color: #FFFFFF;
            float: left;
            font-size: 16px;
            line-height: 20px;
            margin: 0;
            min-height: 60px;
            padding: 4px 5%;
            text-align: center;
            text-transform: capitalize;
            width: 90%;
        }

感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

您可以将div的背景设置为图像

,而不是使用img
<a href="/de/index.php?section=shop&amp;catId=17">
   <div class="categorie-image-wrapper">
     <div style=background:url(http://shop.jci.ch/images/shop/butcher-lg.jpg.thumb);width:10px;height:10px;></div>
   </div>
</a>
相关问题