V
V
Victoria2021-07-14 18:30:17
css
Victoria, 2021-07-14 18:30:17

How to typeset similar text in cards correctly?

60ef028722868122286717.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Glao, 2021-07-15
@Horain

You can use pseudo-elements:
https://codepen.io/wutwutwut/pen/WNjpbXb

V
Vladimir Korotenko, 2021-07-14
@firedragon

https://jsfiddle.net/vkorotenko/zapn0duc/
Something like this

A
Alexander, 2021-07-15
@d1xi

You can do something like this, play only with top and margin, well, set the sizes for the fonts accordingly

<div class="price">
    <sup>$</sup> 00 <sub>per month</sub>
</div>

.price {
  display: flex; align-items: baseline; justify-content: center;
}
.price sup {
  position: relative; top: -10px; margin-right: 2px;
}
.price sub {
  position: relative; top: -2px; margin-left: 5px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question