Setze die Werte für border - margin - padding

Margin
Border
Padding
Box-sizing

Vorschau

Boxmodell

Das CSS-Box-Modell legt fest, wie Browser die Größe eines Elements berechnen.
Ändere die Werte und beobachte, wie sich Rand, Rahmen und Innenabstand auf das Layout auswirken.

→ zum Tutorial

CSS

.box {
  margin: 20px;
  padding: 5px;
}