In a webpage, I want to display several Items. When user clicks any of those Items, some text with explanation is shown. The graphic schema is as follows (each colored square will be a photo).
Initial state:
After the click: (Item2 clicked in the example)
As can be seen, I want the text with the explanation to occupy all the width of the container, and the second row of images to move down (as wel of all other content, including footer). I also want this schema to be responsive, i.e. on mobile devices instead of four items in a row there will be only one.
I've been dealing with this for a couple of days, and one of my approaches was to set four divs (for first row elements) stacked one over the other using position: absolute;. Each of those divs contains the photo (positioned with left: 0%, left: 25%, left: 50% and left: 75%) and the corresponding text. But my problem is that with position: absolute the content of the div do not occupy space, so I cannot 'move down' the rest of the content after clicking.
Another approach was to set the div for displaying the text after the four clickeable images. My problem in this case is with mobile devices: on mobile devices I obviously want the text to be display below the corresponding image, not four images away.
Does anybody have a tip for where to begin? Not a full code of course, but just a basic idea/approach.

