im building wordpress theme and i created 4 sidebars to use on footer, now i need to have dynamic width of those 4 sidebars depending of how many of them are active.
So for example if i have only footer1 sidebar active, his width should be 100%
If i have footer1 and footer2, or footer1 and footer4, or footer2 and footer3 active they should be 50%,
If i have 3 of them active 33%
And if i have all 4 of them each one should be 25% width.
Just to say again, these are not active widgets in one sidebar, all 4 of them are separated sidebars.
I think this could be done with "switch" and "case" php functions, or with "if" but i don't know how to count them.