Re: Positioning pf a Line Box

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 UTC