Reputation: 11
The code is:
<div class="mf-product-price-box">
<span class="price">
<span class="woocommerce-price-amount.amount">
<div class="item-sold">
<span class="items-sold-texts">1 item sold</span>
</div>
</span>
</div>
My question is, how to combine these 2 rows into 1 rows, with side-to-side?
Upvotes: 0
Views: 449
Reputation: 744
Please try something like this. I prefer to use flexbox in such cases. Let me know if it helped.
.mf-product-price-box {
width: 26rem;
border-radius: 8px;
overflow: hidden;
box-shadow: 0px 4px 8px #ddd;
padding: 1rem;
display: flex; /* You need this... */
justify-content: space-between; /* and this */
}
<div class="mf-product-price-box">
<span class="price">RM 360.00</span>
<span class="woocommerce-price-amount.amount">
<div class="item-sold">
<span class="items-sold-texts">1 item sold</span>
</div>
</span>
</div>
Upvotes: 1