0

Is there a way to add a thousands seperator using CSS?

For example if I have number 15000 I want to be able to display it as 15,000 and I need to do this in CSS. Is this possible?

dmonroy100
  • 31
  • 4
  • If you are using your CSS on static data (ie HTML text content or database static text content) then you can update the source data with a REGEX find and replace to format as you require. If you are using any sort of programming interface (PHP, Ruby, etc.) to load the data into your HTML/CSS framework then you can use various functions native on these programming langauges to change the data at point of sending from server to the client browser. CSS is NOT the place to do this as CSS is focused on *stylisation* rather than *formatting*. – Martin Mar 16 '22 at 21:46

1 Answers1

1

You can not do that with pure CSS. you will need to use JavaScript.

Martin
  • 22,212
  • 11
  • 70
  • 132
Faisal
  • 127
  • 1
  • 7