I am attempting to develop something like the table in the photo I supplied.
When utilizing the table aspect, this is extremely very easy due to the fact that the header components as well as the body rows are instantly aligning appropriately. However utilizing tables for my objective is not semantically appropriate as well as undesirable for my job, which is why I am looking for a replacment utilizing grid or flex.
As you can see from my bit, I am having a tough time obtaining it to function due to just how the grid in the header is not the like the grid in the rows. Nonetheless, I do not which to define details sizes to every column as well as rather I desire the columns to just be as large as their web content. Just how can I do this?
header {
display screen: grid;
grid-template-columns: repeat( 5, car);.
void: 0.5 rapid eye movement;.
}
. row {
display screen: grid;.
grid-template-columns: repeat( 5, car);.
void: 0.5 rapid eye movement;.
extra padding: 0.75 rapid eye movement 0;.
border-top: 0.0625 rapid eye movement strong black;.
}
/ * Simply to see where the cells begin as well as finish: */.
: is(. header,. row) > > *: nth-child( 1) {history: #ccd;}
: is(. header,. row) > > *: nth-child( 2) {history: #cca;}
: is(. header,. row) > > *: nth-child( 3) {history: #ccc;}
: is(. header,. row) > > *: nth-child( 4) {history: #ccf;}
: is(. header,. row) > > *: nth-child( 5) {history: #ccb;}
<< div course=" container">
<> < div course=" header">
<> < period><> .
<< period>> Call<.
<< period>> Kind<.
<< period>> Photo<.
<< period><> .
<.
<< div course=" row">
<> < switch kind=" switch">> Relocate< < input kind=" message">
<> < choose><> < choice worth=" 1">> choice 1< .
<< input kind=" documents">
<> < switch kind=" switch">> Remove< .
<< div course=" row">
<> < switch kind=" switch">> Relocate< < input kind=" message">
<> < choose><> < choice worth=" 1">> choice 1< .
<< input kind=" documents">
<> < switch kind=" switch">> Remove< .
<< div course=" row">
<> < switch kind=" switch">> Relocate< < input kind=" message">
<> < choose><> < choice worth=" 1">> choice 1< .
<< input kind=" documents">
<> < switch kind=" switch">> Remove< .
<< div course=" row">
<> < switch kind=" switch">> Relocate< < input kind=" message">
<> < choose><> < choice worth=" 1">> choice 1< .
<< input kind=" documents">
<> < switch kind=" switch">> Remove< .
<