title: How to dynamically adapt the layout of child elements to parent container's width?
body: <p>What I want to achieve is an adaptive inner content layout relative to the parent container's width. Not too sure if using CSS media queries is an option here since they refer to screen width rather than to a specific container width. I want the same code to display a set of thumbnails either in 2, 3 or 4 columns depending on what container it is wrapped within.</p>
  
  <p>I'm looking for an "automated" way of doing it rather than have to manually play with css. In other words, a "responsive layout" that would use "max-parent-container-width" instead of max-"device-width" if that makes sense.</p>
  
  <p>Is there a solution to this, please?</p>