W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: align property

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 26 Jan 2011 14:13:09 -0800
Message-ID: <AANLkTimgiELn44vHyC3yKbmuBG4OzjP3L2cSD_jf=Sdf@mail.gmail.com>
To: Bruno Podvezanec <bruno5544@gmail.com>
Cc: Mark Kenny <beingmrkenny@gmail.com>, www-style@w3.org
On Wed, Jan 26, 2011 at 1:26 PM, Bruno Podvezanec <bruno5544@gmail.com> wrote:
> 2011/1/26 Tab Atkins Jr. <jackalmage@gmail.com>:
>> You can do horizontal alignment like what <center> does like this:
>> <div style="display:flexbox; flex-direction:tb;">
>>  <div style="margin: 0 1fl;">I'm horizontally centered, no matter
>> what my width is!</div>
>> </div>
>> Flexbox should make this all very simple.
> This is what I'm talking about :) these are all workarounds, look at
> simple tag in old html <center> what does it do? it aligns everything
> and anything. How long is it? it only takes you to write simple
> <center>.
> Now 15 or more years into the future we achieve same thing BUT with
> more complicated coding, how does that makes sense ? :-)

<center> was a mistake, the same as the 'align' attribute, the <font>
element, and other presentation parts of HTML.  It was rightfully
removed.  The fact that CSS has gone this long without a good ability
to center things is a tragedy, but that's in the past.

> I would rather use my idea to just simplify everything and create
> 'align' property to align anything I want in the document(or at least
> most important feature aka box) as we could do it with <center> or
> <xtag align="center">.
> 'text-align' property should be used only for textual purposes as its name says.
> and 'vertical-align' should be used in the meaning of 'align' property
> but for all elements in vertical positioning of course.
> Both 'align' and 'vertical-align' should have standard 3
> positions(left, center, right / top, middle, bottom) plus to determine
> alignments with % and/or length (px, em, pt...).
> Which would work like:
> align:left center 20%  - means, it aligns 20% to the left from center area.
> align:right center 50px - means, it aligns 50px to the right from center area.
> 'vertical-align' in same way but for vertical alignments.
> This makes perfect sense and it's most logical way how this properties
> should work. Brainstorm it some more if needed you'll see it has
> perfect sense.

There are significant problems with trying to mix this sort of
alignment with block layout, unfortunately.  It really isn't as simple
as you think it is, because of several features, like floats, that
make block layout good for layout out documents, but not for laying
out applications or complex web pages.

Received on Wednesday, 26 January 2011 22:14:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:42 UTC