Is there a way to style the content of an element as currency using just CSS? It would be great to know if we can control how the value is displayed with CSS. I haven't found anything yet, so not getting my hopes up :)
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.dollars:before { content:'$'; }
</style>
</head>
<body>
Using only CSS: <span class="dollars">25153.3</span>
<br />
Desired format: <span>$25,153.30</span>
</body>
</html>
The output of that example will be:
Using only CSS: $25153.3
Desired format: $25,153.30
I am aware that it's quite simple to achieve this using javascript - http://css-tricks.com/snippets/javascript/format-currency/.