I am currently working on designing a grid layout that will display a child element when clicked.
Here is what I have in mind:
[ link1 ] [ link2 ] [ link3 ]
[ link4 ] [ link4 ] [ link4 ]
When clicked, it will turn into:
[ link1 ] [ link2 ] [ link3 ]
[---------link2 content---------]
[ link4 ] [ link4 ] [ link4 ]
Essentially, clicking on link2 will reveal content related to link2 in the grid below it.
I initially tried to achieve this in a semantic way by grouping the link and content in a dl tag...
<div style="display: flex">
<dl>
<dt><a href="#accordion1">Link1</a></dt>
<dd>Content 1</dd>
</dl>
<dl>
<dt><a href="#accordion2">Link2</a></dt>
<dd>Content 2</dd>
</dl>
<dl>
<dt><a href="#accordion3">Link3</a></dt>
<dd>Content 3</dd>
</dl>
..etc
</div>
My concern is whether I will be able to make the corresponding dd element full width due to the adjacent dl blocks.
If that's the case, should I consider breaking up the layout into a series of divs (even if it makes it less semantic)?
Any assistance would be greatly appreciated.
Thank you in advance,