Re: align property

On 26/01/2011 7:04 PM, Bruno wrote:
> 'box-align' should probably replace<div align="center">  and<center>,
> but when will this be applied? I don't see support for this in
> browsers?


No need to introduce a new property. That is achieved by margin-left and 
margin-right with values of 'auto' applied to a block-level child to 
horizontally center it with it's block-level parent. If the child is 
inline-level, then text-align: center (given to the parent) will 
horizontally center an inline-level child within it's block-level parent.

To know the difference between block-level formatting and inline-level 
formatting may help. Please see points 9.4.1 an 9.4.2.

http://www.w3.org/TR/CSS2/visuren.html#normal-flow


> Vertical-align refers more to<img>  tag then on anything else, you
> can't align anything with 'vertical-align' inside box.
> Vertical-align should be called something like 'vertical-img-align' to
> make more sense and not have general name when it doesn't offer
> general features.
>
>
> Bruno


This is a legacy aspect of CSS (an error when viewed in hindsight) that 
will *not be changed* since older browser wouldn't have the support for 
a new way to vertically align.

The development of CSS and the way it's designed allows new feature to 
be added without breaking existing support. At this moment, the below 
CSS is not supported in any browser,

super-contrast: auto;

but at the same time, all browsers should be able to parse it correctly 
and skip to the next declaration.

http://www.w3.org/TR/CSS2/syndata.html#unsupported-values

This allow for graceful degradation.


I do suggest that you study up on CSS.

http://www.w3schools.com/css/default.asp


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Wednesday, 26 January 2011 11:22:52 UTC