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

Re: Horizontal alignment of blocks (was: Ideas for CSS 3.0?)

From: Mikko Rantalainen <mira@st.jyu.fi>
Date: Thu, 05 Jun 2003 01:49:06 +0300
Message-ID: <3EDE7762.6030403@st.jyu.fi>
To: www-style@w3.org

Arthur Wiebe wrote:
> Yes there has to be a width smaller than the parent in order for it to 
> be centered. { align: center; width: 60%; } would just be better than 
> having to use margins. And also align would be easier to understand. 

Well, the user agent would need to map that "align" property to margins 
anyway or it wouldn't make any sense (think "align: center" combined 
with "margin-left:0; margin-right: 90%;" What should the user agent do?).

So basically we would create new property "align" with possible values 
of "left", "right" and "center". And all it would do, is to interpret 
those as "margin-left: 0; margin-right: auto;", "margin-left: auto; 
margin-right: 0;" and "margin-left: auto; margin-right: auto;" 
respectively. Yes, it would allow shorter style declaration /in some 
cases/ but in the same time, it would add some bloat to all user agents.

I really think that page authors do need to know the difference between 
"text-align" and this proposed "align" attributes and if they understand 
that difference, then using margins for centering instead of this 
"align" property shouldn't be any problem anyway.

Received on Wednesday, 4 June 2003 18:49:10 UTC

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