In my web app development, I have crafted a unique 'virtual desktop' where I can open draggable and resizable 'windows'. These windows are represented by absolutely positioned div elements. I am looking to create responsive content within these windows, scaling from 4 columns at 25% width each down to 1 column at 100% width.
Instead of using frameworks, I am seeking a custom solution for this particular scenario.
I have experimented with @media queries, but they do not work as intended since I am adjusting the dimensions of the virtual window's content area, not the browser window itself.
Is there a CSS3 technique that I might be overlooking? Essentially, I need to dynamically change the width (as a percentage) of a class based on its parent element's dimensions, which are unrelated to the browser window. My goal is to target the immediate parent of the class rather than the overall viewport.
Could this be achievable?