How can I display the "$" sign through CSS Content:" " I've tried all kinds of different codes. Putting just
div.example {Content:"$1000";}
displays on the site like "00".
Trying to do this before resorting to Javascript.
How can I display the "$" sign through CSS Content:" " I've tried all kinds of different codes. Putting just
div.example {Content:"$1000";}
displays on the site like "00".
Trying to do this before resorting to Javascript.
.dollar:before {
content: '$';
}
::
. From MDN, CSS3 introduced the ::before
notation (with two colons) to distinguish pseudo-classes from pseudo-elements. -- developer.mozilla.org/en-US/docs/Web/CSS/::before –
Casuist You can use the following code for displaying the dollar sign in the CSS content property
div.example { content: "\0024"; }
There isn't quite enough HTML to go on, but to take a shot:
The CSS property content
is to be used with ::before
and ::after
and when i put a $ inside my content declaration, everything works...
© 2022 - 2024 — McMap. All rights reserved.