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.

-- 
Mikko
Received on Wednesday, 4 June 2003 18:49:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:21 GMT