I have successfully centred the woocommerce products on my page using css. However, the star-ratings div refuses to center whatever I do to it. I can change its colour and background, so I know that I am referring to the right element. Any help would be appreciated.
CSS:
#top_rated_wrapper ul.columns-4 li.product {
display:block;
width:100%;
}
#top_rated_wrapper ul.columns-4 li.product a {
text-align:center;
}
#top_rated_wrapper ul.columns-4 a {
text-align:center;
width:100%;
}
#top_rated_wrapper ul.columns-4 li.product img {
object-fit:contain;
object-position:center;
max-width:100%;
height:300px;
}
.star-rating {
float:none;
display:block;
margin-left:auto;
margin-right:auto;
}
The last class reference (.star-rating) doesn't work to center the element. '#top_rated_wrapper' is just my own wrapper around the woocommerce content. I have also tried a straightforward text-align:center
.