Re: [css] about vertical-align on display:block elements.

On 01/02/2014 21:46, Andrew Fedoniouk wrote:
> (Sorry about revitalizing the horse)
>
> For display:block elements,
> what conceptually stops us from treating `vertical-align`
> exactly in the same way as in display:table-cell ?

Backward compatibility with existing content that may rely on 
vertical-align doing nothing in this case.


> I believe this functionality is so basic and asked for
> so frequently that we should do something about it.

Use Flexbox.

http://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/


> There is also a need for horizontal-align: left | center | right;
> if we want to reproduce <center> behavior in CSS.
> But that's probably another story.

Also Flexbox. (Not with the exact corner cases of <center>, but should 
cover the use cases AFAIU.)

-- 
Simon Sapin

Received on Saturday, 1 February 2014 23:03:32 UTC