[Prev][Next][Index][Thread]

CSS Positioning Draft



Ka-Ping Yee writes:

 > From a quick look at the draft, i see that all the elements
 > may be positioned relative to the top-left corner of the
 > parent, but not to the bottom or right.  What if one wants
 > to place an element (say, a menu) exactly two inches wide
 > along the right edge of the window? 

 > The most obvious solution is to allow "right" and "bottom"
 > properties

Yup, your example could become:

  LI.menu {
    width: 2in;
    right: 5% }


 > I think it's reasonable
 > to ask people not to put these values in conflict.

We will need a conflict resolution policy, but CSS already has several
of these. E.g., if you overconstrain the metrics of an element:

  #foo {
    width: 10px;
    margin-left: 0;
    margin-right: 0 }

.. the CSS1 spec says that 'margin-right' will be set to 'auto' [1].

[1] http://www.w3.org/pub/WWW/TR/REC-CSS1#horizontal-formatting

Thanks for your suggestions,

-h&kon

H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome


References: