How to change the number of columns in the style at runtime
Question

I have a react app that is displaying content in multiple columns.  

I am doing this by having three containers, and setting each container to 4 cols in the style:

This works great, however there are some instances where there are only two containers with information, and in those instances I want to display the two containers as 6 col programmatically at run time.  (Similarly, I might add a container and want to set them all to 3 col).

I did attempt to set the width manually, in pixels, but it doesn't resize properly on smaller screen sizes.

Thank you!



Hello Christopher Bailey,

Instead of pixels can you try with % may be it will helps you.. 

Example 50%,25% like wise 


Thanks and Regards,

Akshay Deshpande

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.