Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-09-2011, 08:37 PM   PM User | #1
Enexeus
New to the CF scene

 
Join Date: Nov 2011
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Enexeus is an unknown quantity at this point
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.
Enexeus is offline   Reply With Quote
Old 11-09-2011, 08:49 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
Enexeus (11-09-2011)
Old 11-09-2011, 08:57 PM   PM User | #3
Enexeus
New to the CF scene

 
Join Date: Nov 2011
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Enexeus is an unknown quantity at this point
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!
Enexeus is offline   Reply With Quote
Reply

Bookmarks

Tags
html image link very

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:55 PM.


Advertisement
Log in to turn off these ads.