Wordpress Woocommerce Div Clear Rows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Wordpress Woocommerce Div Clear Rows

Post by simonmlewis »

Hi

We have issues on our commerce sites where, if there are variables below the tiled images, showing for example:
Blue: in stock
Black: out of stock
Red: in stock
Green: in stock
and so on...

As we add more, it increases the height of the tiled DIV, and causes a tiling issue. We then have to set minimum heights on various screen sizes so it doesn't break.
If I were building this custom, I'd set, after every 3rd Div, a style: clear: both.

But how do you do this within a function in Wordpress?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Wordpress Woocommerce Div Clear Rows

Post by Celauran »

We'd need to see what the function does before we can really say one way or the other. Does it even need to be in the function, though? Couldn't you just do this with CSS?
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Wordpress Woocommerce Div Clear Rows

Post by simonmlewis »

How would you do it in CSS?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply