PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Sep 19, 2018 9:43 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Feb 09, 2018 4:15 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4422
Location: United Kingdom
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.


Top
 Profile  
 
PostPosted: Fri Feb 09, 2018 6:14 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6424
Location: Montreal, Canada
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?

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Fri Feb 09, 2018 6:16 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4422
Location: United Kingdom
How would you do it in CSS?

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Fri Feb 09, 2018 6:19 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6424
Location: Montreal, Canada
https://css-tricks.com/almanac/selectors/n/nth-of-type/

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group