I have a "table" which consists of wrapper element, which is styled as display:grid
and elements which are styled to have border, but elements on the very edge of the table should not have border, creating this border styling pattern:
| | |
---+----+----+----
| | |
---+----+----+----
| | |
Grid has flexible number of columns
display: grid;
grid: none / repeat(auto-fill, minmax(auto, 312px))
and there are no explicit rows, so number of rows is also flexible. Flexible layout is important to have responsive design.
For the sake of simplicity, let's say that grid is comprised of div container and inner div elements with contents like so:
<div class="grid-container">
<div class="element"><p>content</p></div>
<div class="element"><p>content</p></div>
<div class="element"><p>content</p></div>
...
</div>
How to style borders of this "table"? Do note that everything is flexible.
Every solution I found so far relies on known number of columns and rows, which is not the case here.