explorable-viz / fluid

Data-linked visualisations

Home Page:http://f.luid.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`TableView`: decimal alignment

rolyp opened this issue · comments

This should (apparently) be supported by setting align="char" and char="." on a td, but it doesn’t seem to be supported by many (or any) browsers.

One solution might be to use two table columns, one for the integral part and one for the period/mantissa.

Update: No, that would break selectability. Here’s a pure CSS/HTML solution that might be worth trying:

<div>
    <span class="int">11.</span><span class="float">293</span>
</div>
<div>
    <span class="int">233424.</span><span class="float">89</span>
</div>
.int, .float{
    display: inline-block;
    width: 100px;
}
.int{
    text-align: right;
}
.float{
    text-align: left;
}