Hi All,
I am trying to centrally align the prices on my collection pages, and Ive come close, but still have a small issue. I have tried a combination of solutions from this forum, which has gotten me to the below code. Problem is, my prices are still slightly left-adjusted, not quite centered. (Note, I started this process with the prices next to each-other, but that looked strange on Mobile, so I decided to stack them instead, which almost got me to a perfect result, just need the last bit of alignment to get them fully centered)
Also, due to stacking the prices, this has also carried over to the product page, where I would like to have the price/compare-price next to each other, i.e. stacked on collection page, next to each other on product page (and of course left aligned on product page, which they currently are).
Hope someone has the answer. thx
Product page (prices should be in the same row and left aligned)
Collection Page (Prices should be stacked, as they are, and fully centrally aligned, which they almost are, but still a bit to the left)
Code used to get to this point in Assets->theme.css:
/== Center Align Titles and Prices Under Product Images in Collections & Product Recommendations ==/
dl.price {
align-items: center;
}
.h4.grid-view-item__title.product-card__title {
text-align: center;
width: 100%;
font-size: 15px;
display: block;
text-decoration: none;
text-transform: uppercase;
line-height: 1.6;
}
.template-product dl.price{align-items: flex-start;}
.product-recommendations__inner dl.price {align-items: center;}
.price__sale {
margin-right: 0;
display: block!important;
}
.price__compare dd {
margin-right: 1;
display: block!important;
}
.price__regular dd {
margin-right: 1;
}
.product-card {
text-align: center;
}
.price–on-sale .price__badge–sale {justify-content: center;}
/== Removes Underline Upon Hover ==/
.product-card:hover .product-card__title,
.product-card:focus-within .product-card__title {
border-bottom: none !important;
}
/== Change font on product price on product page ==/
.price-item {
font-size: 16px !important;
font-weight: 400;
color: #333232 !important;
}