Yu-Hsuan,

The extra space you're describing is likely the content space reserved in a inline element for typeface descenders (the bits of letters like 'y' and 'g' that dangle).

An inline image I think is by default vertically aligned to the baseline of the inline content space (which is the 'line' that the descenders of letters like 'y' dangle below), so the fix to your problem is to either align to the bottom of the inline content space, or make your image a block element--like so:

a.tool img {vertical-align:bottom;}
or
a.tool img {display:block;}

Cheers,
Shawn

On 12/6/2010 10:59 AM, Yu-Hsuan Lai wrote:
My HTML is :

---
<a class="tool" style="padding:0;border:0;margin:0" href="#">
          <img height="100%" src="img/next_page.png" alt="next page" />
</a>
---

I think that<a>  should fill up with<img>, but in fact,<img>  is smaller
than<a>.
Like this:http://ppt.cc/RqlC
Can I make them the same size?

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to