At 2:16 AM -0400 7/27/07, Brian Cummiskey wrote:
>David Hucklesby wrote:
>>  It sounds like the image is sitting on the baseline of the text --
>>  in other words, it has a space underneath where the text descenders lie
>>  ("tails" of g, j, p, etc.)
>>
>That's what i thought at first too....   but there's no tail text.  its
>always "X Items".  (where "X" is a number)

    That doesn't actually matter.  The text line is laid out in such a 
way that the space for descenders is always there, whether or not it 
appears to be needed.  I think this is actually a limitation of 
character handling in computers, not of CSS, but it would have to be 
that way regardless.

>>  #cart img { vertical-align: bottom; }
>
>While this evened it out, it raised my text, instead of lowering the
>image.  odd.   i guess it works... i'll add some padding-top :D

    That's because the image was, previously, the tallest thing (or, 
better still, had the highest top edge) in that line of text.  When 
you lowered it using 'vertical-align: bottom', its top edge shifted 
downward, and the whole line of text got shorter above the baseline. 
So the text moved up because the image shifted down within the line.
    It's complicated.  It took me two weeks of banging my forehead 
against my monitor before I fully understood line layout.  The time I 
taught a college CSS course, I spent two hours explaining how line 
layout works.  When I was done, everyone in the class had a 
headache-- me included.
    And padding-top may not have any effect, depending on where you apply it.

-- 
Eric A. Meyer (http://meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
   -- Martina Kosloff (http://mako4css.com/)
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to