http://www.perlmonks.org?node_id=948965


in reply to Re^3: CSV or HTML? (now OT)
in thread CSV or HTML?

I believe that something along these lines would have worked at one time...

<style> .mlx-test-align tr td { text-align: "."; } </style> <table class="mlx-test-align"> <tr><td>1.01234</td></tr> <tr><td>101.234</td></tr> <tr><td>101.00</td></tr> <tr><td>10123.4</td></tr> </table>
... but according to the blooberry CSS reference (IME, a fairly reliable summary of the various aspects of the CSS and HTML specs),
The [string] value type has been removed in CSS2.1.
I was not able to produce the correct alignment using text-align, but that may speak more of my capabilities than the capabilities of my browsers.

Rather a shame, as aligning to a character has some useful applications.

Update: It appears that another blooberry page has some possibly updated information (testing below...)

Example from w3.org
Vegetable Cost per kilo
Lettuce $1
Silver carrots $10.50
Golden turnips $100.30

I am not able to reproduce their results. My guess is that I didn't set the document type correctly.

--MidLifeXis

Replies are listed 'Best First'.
Re^5: CSV or HTML? (now OT)
by ww (Archbishop) on Jan 20, 2012 at 14:13 UTC
    There's a statement on http://www.w3schools.com/tags/att_td_char.asp, a w3cschools page with a 2012 copyright (though that may be a mere boiler-plate footer) that "The char attribute is not supported by any of the major browsers."

    My guess is that has more to do with reproducing their results than your doctype setting. When I have a bit more free time, I should probably grab a current version of Amaya and see how it fares (or, perhaps, some other 'masochist'-- see Tux's above -- would like to report some findings).