<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Table vs Flex vs Max-width</title>
<style>
div, table {
font-size:24px
}
.mytable td {
display:inline-table;
border:1px #FAA solid;
text-align:center;
}
.myflex {
display:flex;
flex-direction: row;
justify-content: center;
}
.myflex div {
border:1px #AFA solid;
}
.mymaxwidth {
width:500px;
max-width:80%;
border:1px #AAF solid;
}
@media (max-width: 1000px) {
.mytable {
width:100%
}
.mytable td {
display:block;
width:100%;
}
.myflex {
flex-direction: column;
width:90%;
}
}
</style>
</head>
<body>
<div align="center">
<h1>Responsive Table vs Flex vs Max-width</h1>
<table class="mytable" align="center">
<tr>
<td>Responsive Table</td>
<td>Responsive Table</td>
</tr>
</table>
<br>
<div class="myflex">
<div>Responsive flex</div>
<div>Responsive flex</div>
</div>
<br>
<div class="mymaxwidth">Responsive max-width</div>
</div>
</body>
</html>