Mit dem dritten und letzten T-Style 2 Layout geht es in diesem Artikel weiter…
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 id="startseite"><a href="index.html">Startseite</a></li>
<li id="archiv"><a href="archiv.html">Archiv</a>
<ul>
<li id="01"><a href="01.html">seite01</a></li>
<li id="02"><a href="02.html">seite02</a></li>
<li id="03"><a href="03.html">seite03</a></li>
<li id="04"><a href="04.html">seite04</a></li>
<li id="05"><a href="05.html">seite05</a></li>
<li id="06"><a href="06.html">seite06</a></li>
<li id="07"><a href="07.html">seite07</a></li>
</ul>
</li>
<li id="impressum"><a href="impressum.html">Impressum</a></li>
</ul>
</nav> <!-- Ende vom navibereich innerhalb des header-Bereichs -->
</header> <!-- Ende vom header-Bereich -->
<main> <!-- Anfang vom textbereich -->
<article>
<h1>T-Style 2 Version 3 mit Hover Dropdown horizontal:</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
<div id="spalte1"> <!-- Anfang von Spalte 1 -->
<article>
<h1>Spalte 1:</h1>
<p>
Dies ist Artikel 2 in Spalte 1 in einem zweispaltigem Bereich...
</p>
</article>
<br />
<article>
<h1>Spalte 1:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
<article>
<h1>Spalte 1:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
</div> <!-- Ende von Spalte 1 -->
<div id="spalte2"> <!-- Anfang von Spalte 2 -->
<article>
<h1>Spalte 2:</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
</div> <!-- Ende von Spalte2 -->
<article>
<h1>Artikelüberschrift</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
<div id="spalte1"> <!-- Anfang von Spalte 1 -->
<article>
<h1>Spalte 1:</h1>
<p>
Dies ist Artikel 2 in Spalte 1 in einem zweispaltigem Bereich...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
</div> <!-- Ende von Spalte 1 -->
<div id="spalte2"> <!-- Anfang von Spalte 2 -->
<article>
<h1>Artikelüberschrift:</h1>
<p>
Artikeltext hier einfügen...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
<article>
<h1>Artikelüberschrift:</h1>
<p>
Text des Artikels...
</p>
</article>
<br />
</div>
</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;
}
/* 04 Ebene 2 verstecken */
nav li ul {
position: absolute;
left: -9999px;
top: -9999px;
display: block;
width: 0px;
height: 0px;
background-color: transparent;
}
/* 05 Ebene 2 beim hovern wieder sichtbar machen */
nav li:hover ul {
display: block;
height: auto;
top: auto; /* Pixelwert oder auto*/
left: auto; /* Pixelwert (100) oder auto*/
width: 200px;
background-color: darkorange;
border-bottom: 2px solid darkorange;
}
/* 06 Rausklappliste korrekt einfärben und Hover-Verhalten für die zweite Ebene */
nav li ul a:link {
color: black;
background-color: white;
display: block;
text-decoration: none;
padding: 3px;
}
nav li ul a:visited {
color: black;
background-color: white;
display: block;
text-decoration: none;
padding: 3px;
}
nav li ul a:hover {
color: black;
background-color: red;
display: block;
text-decoration: none;
padding: 3px;
}
nav li ul a:focus {
color: black;
background-color: white;
display: block;
text-decoration: none;
padding: 3px;
}
nav li ul a:active {
color: black;
background-color: white;
display: block;
text-decoration: none;
padding: 3px;
}
} /* 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;
border-style: solid;
border-color: black;
border-width: 0px;
margin-top: 1px;
margin-right: 0px;
margin-bottom: 1px;
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;
border-style: solid;
border-color: black;
border-width: 0px;
margin-top: 1px;
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*/