Beispiel:CSS-Box-Modell-2.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />
<style>
.container {
width: 600px;
height: 200px;
border: 1px solid;
padding: 0;
}
.spalte {
width: 200px;
height: 200px;
border: 1px solid red;
margin: 5px;
padding: 5px;
display: inline-block;
}
</style>
<title>Beispiel: pixelgenaues Mehrspalten-Layout</title>
</head>
<body>
<h1>pixelgenaues Mehrspalten-Layout</h1>
<main>
<div class="container">
<section class="spalte">
<h2>Spalte 1</h2>
<p>Platz für Text</p>
</section>
<section class="spalte">
<h2>Spalte 2</h2>
<p>Platz für Text</p>
</section>
<section class="spalte">
<h2>Spalte 3</h2>
<p>Platz für Text</p>
</section>
</div>
</main>
</body>
</html>