I'm attempting to create a line for pricing where the text-align is aligned differently for each item - left, center, and right.
Despite using text-align
, I am unable to maintain all three items on the same line. Is there an alternative solution or workaround for this issue?
Initially, I approached it like this:
.price span {
display: inline;
}
.previous-price {
text-align: left;
}
.present-price {
text-align: center;
}
.discount-price {
text-align: right;
}
<p class="price">
<span class="previous-price"><s>Tk. 350000</s></span>
<span class="present-price">Tk. 227500</span>
<span class="discount-price">(35% OFF)</span>
</p>