This is what I’m trying to achieve - jsfiddle example
I don’t understand the js and not sure how I can implement this into my code.
My code only displays the content div below the clicked container. How can I make it show below the full row that’s in view, taking into account this will be responsive?
Wondering the best approach, maybe a more simplistic way than the example above?
Not tabs, I’ve used tabs before. In this instance all the containers are showing, the hidden content is related to each column and will be shown when somebody clicks the image.
If you have a quick look at the first fiddle example and click the numbers you’ll see what I mean.
Compared to the codepen example.
I don’t know there’s going to be a more simplistic way that is still responsive/flexible to a variable number of items in a column… the Fiddle’s code is designed so that it can respond without preordaining the number of elements in a row.
At the risk of butting in where I’m not wanted I did have a similar old demo that displayed full width content in rows under the tabs.
I’ve just updated it to use flex (as it previously used floats) and is shown below.
This is only proof of concept and untested but may help with your quest.(Also the tabs should probably be anchors rather than divs so that you can tab through with the keyboard like my old float example.)
The demo is a little rigid because I change the order (using the property ‘order’) of the tabs in the media queries using the order property to align them all properly. That means the css references each item so if this is a dynamic number of elements that part would need to be scripted instead to make it automatic.