开发者

Navigation image-link not working

开发者 https://www.devze.com 2023-04-04 07:01 出处:网络
This should be simple but I can\'t figure out why this image-link doesn\'t work? When I hover over the image it\'s as though there isn\'t a link to click on but it\'s there...see code below.

This should be simple but I can't figure out why this image-link doesn't work? When I hover over the image it's as though there isn't a link to click on but it's there...see code below.

.researchnav {
display: block;
background: url(../images/research.png);
background-repeat: no-repeat;
width: 457px;
height: 38px;
margin-left: 370px;
text-indent: -9999px;   

}

.researchnav:hover {
display: block;
background: url(../images/research_over.png);
background-repeat: no-repeat;
width: 457px;
height: 38px;
margin-left: 370px; 

}

<ul id="nav">
    <li class="researchnav"><a开发者_开发百科 href="research.html">Research</a></li>
</ul>


Try applying the styles to the a instead of the li.

<a class="researchnav" href="research.html">Research</a>
0

精彩评论

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