Image links wont work in any browser
Im pretty new to html/css so maybe this is a really simple thing but none of my images links on one page of the site show up when I try to click on them the image shows but the link never appears and the cursor never changes anyway here is the relevant section of code
<div id="content">
<div id="imagelink">
<a href="#"><img border="0" src="Images/pic.png" alt="A Picture" /></a>
</div>
#imagelink {
background-image:url("Image开发者_运维问答s/file.png");
display:block;
height:224px;
width:401px;
text-indent:-9999px;
position:absolute;
left:15%;
top:25%;
}
<div id="imagelink">
<a href="#"><img border="0" src="Images/pic.png" alt="A Picture" /></a>
</div>
Try not to use the img tag and instead, use a div for your image:
<a href="#" target="_BLANK">
<div class="myImage"></div>
</a>
.myImage{
background: url(Images/file.png) no-repeat top center;
height: 224px;
width: 401px;
}
- if your server is case sensitive change Images to images
- add ./ or http://domain.com/path/to/images/ to the paths
精彩评论