Anyone knows how to achieve this design?
This table has empty <tbody>, but its height is fixed. Normally table has dynamic height, but in this image it doesn't.
Tried using flex, but its just weird to use it for table.
Codepen:
https://codepen.io/aurasp/pen/dywaNKQ
5 Replies
Flex is a bad choice for tables, but you can use grid with subgrid (so each row can stay aligned)
Is it actually okay to use grid?
I don’t know. I was just saying that in response to them using flex
There are lots of things that really are tables but don’t look like it (lists primarily) that benefit from subgrid and then things that don’t need anything more than a table
Semantically a table is better for tables however tables have historically been misused so much that you can’t really rely on them and there are already alternatives used. Most tables you’ll find don’t use the table element
The correct option is not super obvious
+1