W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Positioning pf a Line Box

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Mon, 30 Jun 2008 17:46:27 -0700
Message-ID: <c9e12660806301746j748e030atfcf1d36ef721b753@mail.gmail.com>
To: "Garrett Smith" <dhtmlkitchen@gmail.com>, Www-style <www-style@w3.org>

On Mon, Jun 30, 2008 at 5:30 PM, L. David Baron <dbaron@dbaron.org> wrote:
> On Monday 2008-06-30 17:19 -0700, Garrett Smith wrote:


>> In firefox, the top value seems to include the parent line boxes leading.
>

Sorry, not the top value. Where the element appears, is offset by its
parent box's leading.

> Do you mean inline boxes rather than line boxes?  Line boxes
> represent the lines of a block (not elements in the tree); inline
> boxes represent elements with display:inline.
>

I see. I mean "line-boxes".

>> Is there a way to calculate the position of an element and assert that
>> that calculation is correct?
>
> Are you talking about writing test cases?

Well, that's what I'm doing. I'm trying to figure out where an inline
element is, but it seems that the rule is that the inline element is
positioned from its containing block's content area. This does not
include the half leading area of P's line box; it's just the text.

> In some specific
> framework?
>
>> IOW, If I have a line box B in a line box P, and B has text-align:
>> top, it seems that B's top value is starting at the leading P's line
>> box.
>
> What's a "leading P"?
>

Sorry, I meant: "The 'leading' of the parent."

If a parent had big text (probably with a proportionally large
leading), and the child had position: relative, how can I, as a human,
figure out where the child will appear, in respect to its parent's
line box? This is given that I don't know the size of the leading for
the parent.

Garrett

> -David
Received on Tuesday, 1 July 2008 00:47:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT