l107/proberen.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
.container {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 kolommen met gelijke breedte */
gap: 10px; /* Ruimte tussen de cellen */
}
.cell {
border: 1px solid #000;
padding: 10px;
}
.table-container {
overflow-x: auto; /* Horizontaal scrollen inschakelen indien nodig */
}
</style>
</head>
<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
<div class="container">
<div class="cell">
<div class="table-container">
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
<tr>
<td>Data 3</td>
<td>Data 4</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Herhaal deze div voor elke cel die je wilt toevoegen aan het raster -->
<div class="cell">
<div class="table-container">
<!-- Inhoud van de tweede cel -->
</div>
</div>
<div class="cell">
<div class="table-container">
<!-- Inhoud van de derde cel -->
</div>
</div>
<!-- Voeg meer cellen toe indien nodig -->
</div>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse