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

Re: [selectors] [css3-content] The ::inside pseudo-element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 21 Jan 2009 13:07:01 -0600
Message-ID: <dd0fbad0901211107o59474ae1rcac6619a78b22444@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Giovanni Campagna <scampa.giovanni@gmail.com>, www-style@w3.org

On Wed, Jan 21, 2009 at 12:36 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Giovanni Campagna wrote:
>> How would you do that? If you display the ::before with inline-block, it
>> will not float (only block can float), neither it will text-align unless you
>> manually widen the inline-block box (but it will align left of the widened
>> block, not left of the table-cell).
>> (The use case is the same as the first post, aligning generated content to
>> the start edge of a table-cell, while putting the dom content aligned on the
>> right, like in Microsoft Excel "Contability" formatting)
> Ok, I seem to really be missing something.  Let's step back for a second.
>  Forget generated content.  Let's say you can edit the HTML to produce the
> effect you want.  What would the original HTML+CSS (before the effect has
> been produced) look like?  What would the final HTML+CSS (with the effect
> produced) look like?

Let's start with the use-case.  Giovanni wants to be able to line
things up like this:

|$  5.00|
|$ 25.00|
|$ 25.5 |

So that the content is aligned both on the "$" and the ".".

Currently, the only way to do this is by splitting this into two table cells:


td { text-align: "."; }

This is pretty darned unsemantic, though.

Received on Wednesday, 21 January 2009 19:07:36 UTC

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