0
votes

I'm using WooCommerce with a WordPress theme that hasn't been written to be compatible with the plugin. For the most part I have the CSS working so that the shop looks okay, but I have run into trouble. For some reason, when I go to a category of products, they show up on top of one another, and not in a grid or side by side. I am going nuts trying to figure out how to fix this, and failing.

Page: http://urbexploration.ca/product-category/sanatoriums/

At first, I realized that each < li > (product) had a huge margin on the right, so I took that out with margin-right: 0; but they still are not floating left in a grid. If any code is needed, please let me know. I've been trying to target the < li >tags which have the class 'product'. The < ul > is 'products'.

I've tried

.products li, .product{ float: left !important; margin-right: 0 !important; }

The ul tag seems to fill the area it should using Google Chrome developer tools, and the li is now sized properly (I think) but it still doesn't float? Or maybe it IS floating and I'm missing something else.

Took clear:both; out of the .excerpt class as suggested, and that seems to be floating them properly.

1
"they still are not floating left in a grid." Are you using the float property? You should post what you have tried so far.helgatheviking
Use Firebug or Chrome's dev tools to inspect the element's style rules. Hint: look at the theme styles for .excerpthelgatheviking
I've tried .products li, .product{ float: left !important; margin-right: 0 !important; } The ul tag seems to fill the area it should using Google Chrome developer tools, and the li is now sized properly (I think) but it still doesn't float? Or maybe it IS floating and I'm missing something else.UrbExploration
Edit your question... code in the comments is a disaster. And check the .excerpt class. Your theme is adding a clear: both to the same div you are trying to float (woocommerce is floating it by default, so you don't need to add code for that, you just need to undo what your theme is doing there).helgatheviking
I see what you mean! Thanks!UrbExploration

1 Answers

0
votes

To make its own answer:

li.product.excerpt { clear: none; }

would be a good start. The double class selector should make sure the rule is more specific than the problematic .excerpt class itself.