Templates Plugins Courses

Collapse page width on less that 768 when element gets hidden


Im building a dashboard and I needed help with figuring how to collapse the width when my floating group menu gets hidden. I put a conditional statement to hide the menu when page width is below 768 but even after element is hidden it still occupies the space and creates an empty space

How do I make the white box on left occupy the white space ?


Oh I found the solution, I put the white box inside a group and extended that group from both ends to have some fake padding. Then gave it collapse margin when width is less than 768. This collapses the margin for the outer group but inner group still has that fake padding at both ends.

This is the end result, the fake padding lets the inner group which is the white box to have some margin.


Hello @sohaangd07,

Glad that you have managed to find a solution. Please let us know if you will have any other questions.

Best Regards,