Jonathan Carter wrote:
>> Inline content is vertically aligned according to the
>> vertical-align property, within an inline box the height of the
>> line-height (whether you set the line height explicitly or not).
>>
>
> If that is true, then why is the following example text still
> vertically centered?
>
> http://www.epiphanize.com/LineHeightTest.htm
>
> The inline box created with the height of the line-height seems to be
> forcing the vertical centering, which is what I was originally
> asking. No matter what I set the vertical-align of the paragraph, the
> text always stays centered.
Yes, exactly... and that would also happen if no line-height were set,
and the line-height were instead forced by a tall image or large text.
Default behavior, open for change.
Now, bump up font-size in Firefox until that text breaks into two lines,
and see how it is vertically centered within each line-box - not inside
the element. Think that was your first question.
Second question: you can achieve vertical alignment of elements within
elements by using 'display: table-cell', 'display: inline-table' and
'display: inline-block' combined with dimensions and vertical-align. Not
quite cross-browser stable solutions with any one of these properties
yet, but the right combinations will give you a working solution for
simple cases.
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/