W3C home > Mailing lists > Public > www-style@w3.org > June 2003

Re: Ideas for CSS 3.0?

From: Matt <matt@hogwarts-library.net>
Date: Wed, 4 Jun 2003 20:34:24 +0100
Message-ID: <00e901c32ad0$4e9d4640$862a94d9@laptop>
To: <www-style@w3.org>

Arthur Wiebe wrote:
> Mikko Rantalainen wrote:
>> Gerard Torenvliet wrote:
>>> I have been looking over the drafts for CSS 3.0, and they are
>>> missing
>>> a few
>>> things that I had been hoping that I would see:
>>> -    the ability to achieve the same effect as the text-align
>>> style, but for elements like div (i.e., to have the ability to
>>> set a div to a certain
>>> size and then center that div in its parent)
>> What's the problem with
>> div { width: 55%; margin-left: auto; margin-right: auto; }
>> ?
>> The only thing I'm wondering is if text-align: justify combined
>> with inline-block elements can provide me with evenly spaced
>> block-like elements without using extra wrapper elements.
> It's not about what's the problem with { width: 55%; margin-left:
> auto; margin-right: auto; } it is that { align: center; } would be
> much
> shorter and make a lot more sense to a lot more people. When I
> started using CSS with XHTML 1.1 I couldn't figure out why I had to
> use margins
> to align tables when in HTML I could do that with align="center".
> Margins should not be used for alignment. We need to be able to
> type { align: center; } !
> And it should not be for tables and divisions only but also for
> inline elements. That way you can center a div while the other
> things on top
> and under it will remain aligned to the left.
> <Arthur/>

But a width is necessary, else who's to know how wide the div should be?

it wrap
like this

or should it spread across all the available width?


div {
  margin: 0 auto;
  width: 60%;

is fine. After all, centring something *does* require that the margins be
moved - that's what centring a block _is_!

div {align: center }
how does the UI know how wide the div should be? There's width= for IMG and
table, but not div and so on.

Received on Wednesday, 4 June 2003 15:33:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:07 UTC