Das Stylesheet soll logisch aufgebaut sein – vom Großem zum Kleinen
- Thematisch zusammengehörige Anweisungen auch zusammen schreiben – damit man die Übersicht nicht verliert!
- Kommentare verwenden, um Bereiche zu trennen und einfach findbar zu machen
CSS
/* ================== allgemeine Regeln am Anfang ================== */
body {
font-family: Georgia,Times,Serif;
font-size: 100%;
line-height: 1.5;
color: #444;
background-color: #f0f0ea;
}
/* ================== links allgemein ================== */
a:link {
color: inherit;
text-decoration: none;
border-bottom: 1px dotted;
}
a:visited {
color: #818181;
}
a:hover,
a:active,
a:focus {
color: #000;
border-style: solid;
}
main {
width: 60em; /* knapp 960px */
margin: 0 auto 0 auto;
background-color: #fff;
padding: 1em;
}
/* ================== header ================== */
header {
height: 15em;
}
h1 {
width: 7em;
text-align: right;
font-family: Verdana,Sans-Serif;
line-height: 1;
font-size: 700%;
color: #f0f0e9;
}
/* ================== navigation ================== */
nav {
width: 22%;
margin-top: 2.2em;
margin-left: .7em;
}
section {
width: 66%;
}
/* ================== article ================== */
article {
padding: 1.5em 0 3em 0;
}
figure {
background: #dbdbcc;
padding: .5em;
width: 280px;
}
figcaption {
text-align: center;
font-size: 90%;
}
/* ================== footer ================== */
footer {
background-color: #000;
color: rgba(255, 255, 255, 0.56);
}
h2 {
font-weight: bold;
margin-right: .4em;
}