Links and Padding

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have an image which acts a link. It has padding on it and a background
image which is part of the effect. Is there any way of this padding being
clickable as well as the link. See the link below.

<div class="test" style="padding-bottom:20px; background:#eeeeee;
<a href="test.asp">
<img src="home_01_imageready_04.gif" /></a>

Re: Links and Padding

Chris wrote:
Quoted text here. Click to load it
and the replies.

Short summary:

1. make the <a> display:block
2. add the padding to the <a>
3. add a width to the <a> (If you don't it will work in FF and Opera,
but break in IE)


Re: Links and Padding

On 2006-08-01, Chris wrote:
Quoted text here. Click to load it

   Put the padding in the anchor, not the div.

   Chris F.A. Johnson                      <
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Site Timeline