Styling position
Hi guys, I'm trying to style the same position for the money after the text without set a fixed width.
For example:
Subtotal: $100
Total : $100.000
Is there any way to solve this problem?
here is the codepen https://codepen.io/minh-thinh/pen/rNRJZNW
3 Replies
Did you try using a table instead of paragraphs? This kind of stuff is typically what you want a table for (row or columns of values labeled by a heading).
It's sementicaly more appropriate and you will have the alignment for free
You might want to align the numbers to the right for easier readability though (and look up
font-variant-numeric
, especially the tabular-nums
variant as it forces all numbers to be the same sizetable worked well. Thanks for your help
You're welcome :)