How do I hide a division/wrapper and adjust the remaining division/wrappers

I have a response grid with 10 division. Each division has 1 wrapper. I use render conditions to decide if a wrapper is visible. So, if the 5th, 6th, 7th and 8th, wrapper are not visible I would like the wrapper in the 9th position to slide left to the 5th position.

Here is how it is constructed:

If you set your grid size property to “fit to contents” the division will collapse when the wrappers inside it are hidden using conditional rendering. 

Thank you.  Works great.