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

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 UTC