Mobile app version of vmapp.org
Login or Join
Vandalay111

: Format numbers with css Is it possible to format numbers using css ? When I have 7000000.00, I would like it displayed as 7 000 000.00 I know I could write a backend (php, perl...) function

@Vandalay111

Posted in: #Css

Is it possible to format numbers using css ?

When I have 7000000.00, I would like it displayed as 7 000 000.00

I know I could write a backend (php, perl...) function or a javascript function that could return the formatted number but...

The numbers that I want to format are into a cell. I would like to have something like

<td class="myformat">7000000.00</td>
or
<td><span class="myformat">7000000.00<span></td>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pope3001725

Currently CSS does not format numbers in the way you are hoping although it does look like it's being discussed. For now you're best bet is to stick with server-side formatting. You could do it with JavaScript but that wouldn't be as reliable as server side technologies since users can turn it off.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme