I have images that are centered within their parent divs and I would only like for the images to be clickable links instead of the whole divs themselves. I'm not quite sure what the problem is, so any help would be greatly appreciated.
Here is my code:
HTML:
<div class="banner_column">
<a href="#">
<img src="images/image1.png" alt="Image 1" >
</a>
<h1>Check Out Link Above</h1>
<p>Some text here</p>
</div>
CSS:
.banner_column {
width:25%;
display:inline-block;
float:left;
margin-bottom:60px;
}
.banner_column img {
display:block;
width:300px;
height:450px;
position:relative;
margin-top:30px;
margin-left:auto;
margin-right:auto;
}
The problem is the whole column div is a clickable link instead of just the centered image itself.