Es geht mit einem neuen Layout weiter und diese Woche ist es T-Style 2 Version 1 mit Tab Navigation horizontal…
Vorbereitungen:
In einem ersten Schritt erstellen wir eine einfache Textdatei und nennen sie “index.html“. In einem zweiten Schritt erstellen wir den Ordner “01_CSS“ und darin erstellen wir zehn CSS Dateien. Die erste Datei nennen wir “01_zentrale.css“ und die restlichen Dateien nennen wir so wie in der zentralen CSS Datei und in diesem Artikel angegeben.
Der HTML Quelltext:
<!doctype html>
<html lang="de">
<head>
<title>Webdesign Workshop</title>
<link rel="stylesheet" href="01_CSS/01_zentrale.css" type="text/css" />
</head>
<body>
<div id="wrapper">
<header>
<nav>
<ul>
<li><a href="index.html">Startseite</a></li>
<li><a href="seite02.html"> Seite 2</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h1>T-Style 2 Version 1 mit Tab Navigation horizontal:</h1>
<p>
Dies ist das Layout T-Style 2 Version 1 mit Tab Navigation horizontal...
</p>
</article>
<br />
<div id="spalte1"> <!-- Anfang von Spalte 1 -->
<article>
<h1> T-Style 2 mit Tab Navigation horizontal:</h1>
<p>
Dies ist Artikel 2 in Spalte 1 in einem zweispaltigem Bereich...
</p>
</article>
<br />
</div>
<div id="spalte2">
<article>
<h1>T-Style 2 mit Tab Navigation horizontal:</h1>
<p>
Hier könnte Text stehen...
</p>
</article>
<br />
<article>
<h1>Überschriftt:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
<article>
<h1>Überschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
</div>
<article>
<h1>T-Style 2 Version 1 mit Tab Navigation horizontal:</h1>
<p>
Dies ist das Layout T-Style 2 Version 1 mit Tab Navigation horizontal...
</p>
</article>
<br />
</main> <!-- Ende Textbereich -->
</div>
</body>
</html>
Der CSS Code für die Datei “01_zentrale.css“:
@import url(02_fundament.css);
@import url(03_body.css);
@import url(04_wrapper.css);
@import url(05_header.css);
@import url(06_navigation.css);
@import url(07_content.css);
@import url(08_artikel.css);
@import url(09_spalte1.css);
@import url(10_spalte2.css);
Der CSS Code für die Datei “02_fundament.css“:
@media all {
* {
padding: 0;
margin: 0;
}
html {
height: 101%;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “03_body.css“:
@media all {
body {
color: black;
background-color: white;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “04_wrapper.css“:
#wrapper {
margin: 0px;
background-color: white;
}
Der CSS Code für die Datei “05_header.css“:
@media all {
header {
height: 80px;
background-image: url(../cpm-header01.gif);
background-repeat: no-repeat;
background-color: darkorange;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
border-style: solid;
border-color: black;
border-top-width: 0px;
border-left-width: 0px;
border-right-width: 0px;
border-bottom-width: 1px;
padding: 5px;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “06_navigation.css“:
@media all {
nav {
position: absolute;
top: 30px;
left: 245px;
background-color: darkorange;
color: white;
padding: 10px;
border-style: none;
border-color: black;
border-width: 1px;
margin-top: 5px;
margin-right: auto;
margin-bottom: 5px;
margin-left: auto;
font-family: Arial;
font-size: smaller;
}
nav li {
display: inline;
list-style-type: none;
padding: 3px;
}
nav a:link {
color: black;
background-color: white;
display: inline;
text-decoration: none;
padding: 3px;
}
nav a:visited {
color: black;
background-color: white;
text-decoration: none;
}
nav a:hover {
color: white;
background-color: red;
text-decoration: none;
}
nav a:focus {
color: black;
background-color: white;
text-decoration: none;
}
nav a:active {
color: black;
background-color: white;
text-decoration: none;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “07_content.css“:
@media all {
main {
color: white;
background-color: darkorange;
padding: 20px;
border-style: solid;
border-color: black;
border-width: 1px;
margin-top: 3px;
margin-right: 241px;
margin-bottom:5px;
margin-left: 241px;
font-family: Arial;
font-size: smaller;
}
#formular fieldset {
padding: 10px;
}
main a:link {
color: white;
background-color: steelblue;
text-decoration: underline;
}
main a:visited {
color: white;
background-color: steelblue;
text-decoration: underline;
}
main a:hover {
color: black;
background-color: white;
text-decoration: underline;
}
main a:focus {
color: white;
background-color: steelblue;
text-decoration: underline;
}
main a:active {
color: white;
background-color: steelblue;
text-decoration: underline;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “08_artikel.css“:
@media all {
article {
overflow: hidden;
color: black;
background-color: white;
padding: 5px;
border-style: solid;
border-color: black;
border-width: 1px;
}
.flowtext {
background-color: lightsteelblue;
}
.clearingtext {
clear: both;
background-color: white;
}
.artikelfloat {
float:left;
color: black;
background-color: lightsteelblue;
margin-left: 0px;
margin-right: 5px;
margin-bottom: 5px;
padding: 5px;
width: 450px;
height: 200px;
border-style: solid;
border-color: black;
border-width: 1px;
}
.clearingartikel {
clear: both;
overflow: hidden;
color: black;
background-color: lightsteelblue;
padding: 5px;
border-style: solid;
border-color: black;
border-width: 1px;
}
.bildlinks {
float: left;
margin-top: 5px;
margin-right: 15px;
margin-bottom: 5px;
border-style: solid;
border-width: 1px;
}
.bildrechts {
float: right;
margin-top: 5px;
margin-right: 15px;
margin-bottom: 5px;
border-style: solid;
border-width: 1px;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “09_spalte1.css“:
@media all {
#spalte1 {
position: absolute;
width: 210px;
background-color: darkorange;
padding: 0px; /* war 10px*/
border-style: solid;
border-color: black;
border-width: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 5px;
margin-left: 0px;
}
#spalte1 li {
list-style-type: none;
}
#spalte1 a:link {
color: white;
background-color: goldenrod;
display: block;
text-decoration: none;
}
#spalte1 a:visited {
color: white;
background-color: goldenrod;
display: block;
text-decoration: none;
}
#spalte1 a:hover {
background-color: chocolate;
color: white;
display: block;
text-decoration: none;
}
#spalte1 a:focus {
color: black;
background-color: wheat;
display: block;
text-decoration: none;
}
#spalte1 a:active {
color: black;
background-color: white;
display: block;
text-decoration: none;
}
} /* Ende von @media nicht löschen*/
Der CSS Code für die Datei “10_spalte2.css“:
@media all {
#spalte2 {
color: white;
background-color: darkorange;
padding: 0px; /* war 10px */
border-style: solid;
border-color: black;
border-width: 0px;
margin-top: 0px;
margin-right: 0px; /* war 241 Pixel */
margin-bottom:5px;
margin-left: 241px;
}
#formular fieldset {
padding: 10px;
}
#spalte2 a:link {
color: white;
background-color: steelblue;
text-decoration: underline;
}
#spalte2 a:visited {
color: white;
background-color: steelblue;
text-decoration: underline;
}
#spalte2 a:hover {
color: black;
background-color: white;
text-decoration: underline;
}
#spalte2 a:focus {
color: white;
background-color: steelblue;
text-decoration: underline;
}
#spalte2 a:active {
color: white;
background-color: steelblue;
text-decoration: underline;
}
} /* Ende von @media nicht löschen*/