Bug#34634 acknowledged by developer (CSS2 absolute positionning does not work when specifying top property in percent (%) (testcase))
Germain Garand
germain at phoenix-library.org
Wed Jul 24 17:33:30 BST 2002
Le Mercredi 24 Juillet 2002 06:53, vous avez écrit :
> Am Mittwoch, 24. Juli 2002 05:12 schrieben Sie:
> > Le Mardi 23 Juillet 2002 14:03, vous avez écrit :
> > > I've looked at your test case, I think it is displayed correctly now.
> >
> > No it's not...
>
> Sh*t, it would have been so nice...
>
> > CSS2 "top" property expressed in percent within an absolute positioning
> > should be made relative to the viewport.
>
> So the headline should always be displayed in the middle of the window,
> regardless how much text there is in, right?
>
Right - but that is not a spec.
In fact, it's yet another objectable zone in the spec. An absolute purist
would say KHTML behaves right, whereas all other main stream browsers made it
relative to the viewport.
The reason for that is there is no way to specify a relative-to-the-viewport
thing in CSS (because the notion of viewport exists only for "fixed"
positioned elements - that is : elements that don't move when you scroll the
page).
However, practically, web designers (and all the others as well :) need to
have a way of specifying a position when the page displays, otherwise they
wouldn't know if their elements are there or not.
For instance, when you say : "positioned: absolute; top: 500px" you know your
element will be displayed 500px from top, because the document will grow to
suit your need.
But if you say "positioned: absolute; bottom: 500px", and it's not relative to
viewport, then it's relative to the bottom of the document, which you ignore
- hence not absolute at all, because the document won't raise its top to fit
your needs.
Other case : you want a string displayed plain centered (height & width) in
your viewport.
You can't do that with plain CSS2 spec.
Conclusion : the specs are dead dumb in that respect, and there's no way the
one who would blindly follow them would have an excuse...
Being critical regarding standards is essential because they are supposed to
be clever than you.
That's why I like to have this bug report lying around - it's rather a
reminder that the discussion is still open and that blood needs to flow
somehow...
I'll re-open it :-[°
G.
More information about the kfm-devel
mailing list