Reputation: 1913
I have a small eStore powered by wooCommerce plugin on default Wordpress theme "Unite".
I'd like to modify a default price layout which looks like this for now:
Css snippet:
<span class="price">
<del>
<span class="amount">2,200.00 руб.</span>
</del>
<ins>
<span class="amount">1,500.00 руб.</span>
</ins>
</span>
I need to place both prices in one row that it wouldn't break the grid. For now, it renders list of watches this way:
How could I modify css rules to place all prices in one row using css and pseudo-elements? Thank you!
Upvotes: 1
Views: 354
Reputation: 10450
This should do it, but you'll need to change the font sizes so they don't exceed the width of your product container... /* Added a imaginary width to the span.price, not sure how wide your products are? */
span.price {
width: 220px;
display: block;
}
span.price del,
span.price ins {
float: left;
}
span.price del {
width: 35%;
font-size: .7em;
}
span.price ins {
width: 65%;
font-size: 1.4em;
}
<span class="price">
<del>
<span class="amount">2,200.00 руб.</span>
</del>
<ins>
<span class="amount">1,500.00 руб.</span>
</ins>
</span>
Upvotes: 2
Reputation: 19
you can use Float or displat:inline-block for show in line spans ... discount label : Float:left/right Price label : Float
Upvotes: 0