Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Exclamation Image link but only small clickable area

    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.


    Code:
    			<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:

    Code:
    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.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,678
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    Enexeus (11-09-2011)

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    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!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •