Zum Inhalt springen

HTML und CSS - Eine Einführung in die Praxis

Schritt 2 von 7

CSS: Styling Elemente CSS wird verwendet, um Elemente auf deiner Seite zu stileichen. Lass uns unser CSS-Beispiel aus SCHRITT1 anpassen, um zusätzliche Stile hinzuzufügen.

body {
background-color: lightblue;
margin: 0;
padding: 0;
}
 
header {
background: #000;
color: white;
padding: 15px;
text-align: center;
}
 
nav {
background: #333;
padding: 10px;
text-align: center;
}
 
section {
margin: 20px;
padding: 20px;
border: 1px solid #ccc;
background: white;
}
 
footer {
background: #000;
color: white;
text-align: center;
padding: 15px;
position: fixed;
bottom: 0;
width: 100%;
}