...

View Full Version : Image link but only small clickable area



Enexeus
11-09-2011, 09:37 PM
Hey, I'm having an issue with my image link.

It shows the image perfectly but only a very small (in the bottom) area is clickable. I did not make any image maps or anything.



<div class="single_post">
<article>
<figure>
<a href="http://www.battlefield.com/battlefield3"><img src="img/bf3.jpg" alt="battlefield 3" /></a>
</figure>
<p class="post">snip</p>
<footer>
<ul>
<li><time datetime="2011-11-08" pubdate>8 november, 2011</time></li>
<li>Written by <a href="www.youtube.com/enexeus">Enexeus</a></li>
</ul>
</footer>
</article>
</div>


As for my image CSS:


img {
-moz-border-radius: 10px;
-khtml-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: inset 0px 0px 2px #3366cc;
-khtml-box-shadow: inset 0px 0px 2px #3366cc;
-webkit-box-shadow: inset 0px 0px 2px #3366cc;
box-shadow: inset 0px 0px 2px #3366cc;
float:left;
position:relative;
top:10px;
}


I've been trying to work this out the past hour, I'd really appreciate it if you could help me. ;)

Excavator
11-09-2011, 09:49 PM
Hello Enexeus,
I don't seem to be able to reproduce your problem with the code you've provided.

Normally, display: block; makes the full anchored image clickable.

In your CSS, the positioning you use is overriding the float. It's either floated or positioned, not both.

Enexeus
11-09-2011, 09:57 PM
Hello Enexeus,
In your CSS, the positioning you use is overriding the float. It's either floated or positioned, not both.

Getting rid of this seemed to solve it! Only problem was that it looked like **** because of all the text and borders all going through eachother.

Anyway, I got that fixed by alter my paragraph CSS.

Thanks for the quick response btw; Excavator! :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum