Formatting Numbers (Decimal Places, Thousands Separators, Localization, etc) With CSS

Formatting numbers (decimal places, thousands separators, localization, etc) with CSS

Unfortunately, it's not possible with CSS currently, but you can use Number.prototype.toLocaleString(). It can also format for other number formats, e.g. latin, arabic, etc.

CSS3: Is it possible to have thousands separator in numbers?

No CSS cant format numbers, if you would like to do something like that in the client, you would have to look into javascript.

CSS - 10000 presented as 10 000?

You could use a dirty SEO trick: putting plain "10000" in your page and replace it to "10 000" via javascript when it's displayed.

This way robots are more likely to index your "10000" while your users will see "10 000". I know taht your request implies CSS only, but I see no other workaround for what you want.

OCaml Formatting numbers with thousand separators

Unfortunately, nothing, expect that you can use the %a format specifier and provide your own pretty-printer.

Related Topics

Leave a reply