Thanks for you reply. I had read your some articles about CSS, they are great! I also have some questions: 1. I think the container box of the <img> element is the parent block-level element of <a> right? 2. Because the inline box generated by <a> is the only inline box of its line box, so the baseline of the line box is also the baseline of the <a> inline box, so the <img> inline box is aligned with baseline of the <a> element, right? 3. Because the <img> resides in the <a> element, so the <img> inline box is contained within the <a> inline box and the width of the <img> inline box becomes the width of the <a> inline box?
All the best. On Thu, Nov 20, 2008 at 4:36 AM, Ingo Chao <[EMAIL PROTECTED]> wrote: > ray wrote: > ... > >> <a style="font-size:150px;" href="#"><img style="height:20px;" >> src="foo.jpg" >> /></a> >> where the img would be positioned? and why? >> > > The initial value for vertical-align, baseline, applies. It affects the > inline level elements in a line box. Therefore, the image, being inline by > default, should align with the baseline of the parent <a>-element. > > CSS 2.1: 9.4.2 Inline formatting context; > CSS 2.1: 10.8 Line height calculations: the 'line-height' and > 'vertical-align' properties. > > The absolute vertical position of the baseline depends on the font metrics. > > Ingo > > -- > http://www.satzansatz.de/css.html > http://www.dolphinsback.com > ______________________________________________________________________ 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/
