[HTML]
HTML/CSS-Testseite
<meta name="description" content="Eine HTML/CSS-Testseite.">
<meta name="keywords" content="blablabla">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- **************************************************************************************************** -->
<!-- favicon & css & fonts -->
<!-- **************************************************************************************************** -->
<link rel="shortcut icon" type="image/png" href="favicon.png">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato:400,300|Pathway+Gothic+One">
<link rel="stylesheet" type="text/css" href="layout.css">
<!-- **************************************************************************************************** -->
<!-- header -->
<!-- **************************************************************************************************** -->
<header>
<!-- logo -->
<div id="logo"><a href="#startseite"><img src="_img/logo.png" alt="logografik"/></a></div>
<!-- navigation -->
<nav>
<ul>
<li><a href="#startseite">Startseite</a></li>
<li><a href="#projekte_neuigkeiten">Aktuelle Projekte & Neuigkeiten</a></li>
<li><a href="#uebermich">Über mich</a></li>
<li><a href="#kontakt">Kontakt</a></li>
</ul>
</nav>
</header>
[/HTML]
[CODE]/* css dokument */
/* **************************************************************************************************** /
/ reset der css-browser-einstellungen /
/ **************************************************************************************************** */
{ padding:0; margin: 0; }
html
{ overflow-y: scroll; }
/* **************************************************************************************************** /
/ html standard tags (alle tags, bei denen die einstellungen gleich sind) /
/ **************************************************************************************************** */
body, html { margin: 0; padding: 0; width: 100%; height: 100%; }
a { text-decoration: none; }
/* **************************************************************************************************** /
/ zusammengefasste klassen /
/ **************************************************************************************************** */
.page
{ background: #444444; }
header, #startseite .h2_balken, #uebermich, #projekte_neuigkeiten, #kontakt .h2_balken, footer
{ background: #fff; }
#uebermich .h2_balken, #projekte_neuigkeiten .h2_balken
{ background: #111; }
p, a, header nav ul li a
{ color: #999; }
header nav ul li a:hover, #uebermich h2, #links p, #projekte_neuigkeiten h2
{ color: #111; }
#startseite h2, #startseite p, #startseite .button, #rechts .motto, #kontakt h2, #kontakt .kontakt, #kontakt .kontakt a
{ color: #fff; }
p, header nav ul li, .button, #kontakt .kontakt, footer
{ font-family: ‚Lato‘, sans-serif; font-weight:300; line-height:25px; word-spacing:3px; }
footer, footer a
{ color: #666; }
h2, #rechts .motto, #projekte_neuigkeiten .projekte_neuigkeiten ul li .text h3
{ font-family: ‚Pathway Gothic One‘, sans-serif; }
header, header nav ul li a, header nav ul, header #logo
{ transition: all 300ms; -moz-transition: all 300ms; -ms-transition: all 300ms; -o-transition: all 300ms; -transition: all 300ms; }
/* **************************************************************************************************** /
/ umfassende objekte und klassen /
/ **************************************************************************************************** */
.page { width: 100%; min-height: 100%; overflow: hidden; float: left; }
/* **************************************************************************************************** /
/ header /
/ **************************************************************************************************** */
/* fixierung kopfbereich im normalzustand */
header { position: fixed; z-index: 99; top: 0; left: 0; right: 0; width: 100%; height: 50px; border-bottom: px solid #dfdfdf; }
/* platzierung logo */
header #logo { float: left; width: 120px; margin: 10px 0 0 50px; }
header #logo img { width: 100%; height: auto; }
header nav { float: right; height: 40px; margin: 0; padding: 0; }
header nav ul { margin: 10px 8px 0 0; padding: 0; }
header nav ul li { margin: 0 15px 0 0; padding: 0; list-style: none; float: left; }
header nav ul li a { text-transform:uppercase; font-size:12px; }
/* **************************************************************************************************** /
/ header vergrößerung (hover) /
/ **************************************************************************************************** */
header:hover { height: 80px; }
header:hover > #logo { width: 180px; margin: 15px 0 0 50px; }
header:hover >nav ul { margin: 25px 20px 0 0; }
header:hover >nav ul li a { font-size: 15px; }
/* **************************************************************************************************** /
/ startseite /
/ **************************************************************************************************** */
#startseite h2 { text-align:left; margin:450px 0 0 50px; font-size:120px; line-height:110px; }
#startseite .h2_balken { margin:0 0 20px 50px; }
#startseite { background:url(…/_img/bg_startseite.jpg); position:relative; background-position:center center; background-size:cover; background-attachment:fixed; }
#startseite p { margin:0 0 20px 50px; max-width:300px; }
#startseite .button { border:2px solid #fff; }[/CODE]
Das sind die „Basisdaten“ der Seite/Kopfzeile (Header). Funktioniert, aber der Text/die Inhalte der Kopfzeile werden rechts und links ganz außen platziert - und eigentlich will ich ja einen „Rand“ ohne Inhalte (außer Hintergrundbild und Kopfzeilenhintergrund…