@media screen and (max-width: 600px) {
table,
thead,
tbody,
th,
td,
tr {
display: block;
}
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
margin-bottom: 20px;
border: 1px solid #ddd;
}
td {
border: none;
position: relative;
padding-left: 50%;
}
td:before {
position: absolute;
left: 6px;
content: attr(data-label);
font-weight: bold;
}
} Стащил тут https://www.geeksforgeeks.org/how-to-create-a-responsive-table-in-css/