/    Sign up×
Community /Pin to ProfileBookmark

link outside of image

I have a page that has a bunch of thumbnail images for a photo gallery at [URL]http://www.fitnessfusionpa.com/photo-gallery[/URL]. If you mouseover the bottom of the images, outside the border, the link seems to extend past the borders of the images. Using Firebug, if I select the <a> tag around the images, it shows at the bottom of the images, and not actually around the entire image (but yet you can click the image and it works fine). How do I get the link to not extend past the bottom border of the images?

Thanks!

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@r3plicaMar 21.2011 — It is working correctly, despite what FireBug says. The problem you have is that you have padding and margins on the image, which is causing the issue you are describing. If you wish the link to be at the very edges of the image itself, then you must remove the padding and margins.

If you want to have the nice border, then consider doing it this way instead:

<i>
</i>
&lt;style&gt;
.image_container
{
display: block; //Or you can use float: left;
border: 1px solid #FF7600;
margin: 5px;
padding: 3px;
}

img
{
border: 0px;
margin: 0px;
padding: 0px;
}
&lt;/style&gt;

&lt;div class="image_container"&gt;
&lt;a href="#"&gt;&lt;img src="yourimage" alt="whatever" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div class="image_container"&gt;
&lt;a href="#"&gt;&lt;img src="yourimage" alt="whatever" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div class="image_container"&gt;
&lt;a href="#"&gt;&lt;img src="yourimage" alt="whatever" /&gt;&lt;/a&gt;
&lt;/div&gt;

Copy linkTweet thisAlerts:
@r3plicaMar 21.2011 — I havent tested that, but it should work
×

Success!

Help @jrthor2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...