Der 2Wrapper bekommt mit Version 2 einen vertikalen Klick-Dropdown…

Vorbereitungen:

Die Vorbereitungen sollten schon aus den vergangenen Artikeln und Layouts bekannt sein. Wir erstellen die “index.html“ und in einem zweiten Schritt erstellen wir den Ordner “01_CSS“ und darin erstellen wir die für dieses Projekt benötigten CSS Dateien.

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>
</header>

<div id="wrapper2">
<nav>

<ul>
   <li><a href="index.html">Startseite</a></li>
   <li><a href="archiv.html">Archiv</a></li>
   <li><a href="impressum.html">Impressum</a></li>
</ul>

</nav>

<main>

<article>
<h1>2Wrapper Version 2 mit Klick Dropdown vertikal:</h1>
<p>
Willkommen auf der Webseite...
</p>
</article>
<br />

<article>
<h1>Webartikel:</h1>
<p>
Text des Webartikels...
</p>
</article>
<br />

</main> <!-- Ende Textbereich -->
</div> <!-- Ende Wrapper2 Bereich -->
</div> <!-- Ende wrapper Bereich -->

</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_2wrapper.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: 5px;
background-color: white;
}


Der CSS Code für die Datei “05_header.css“:

@media all {

header {
height: 80px;
background-image: url(../cpm-header01.jpg);
background-repeat: no-repeat;
background-color: cornflowerblue;

margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;

padding: 5px;
}
} /* Ende von @media nicht löschen*/


Der CSS Code für die Datei “06_navigation.css“:

@media all {

nav {
position: absolute;
top: 100px;
left: 10px;
width: 210px;
background-color: cornflowerblue;
padding: 10px;
border-style: solid;
border-color: black;
border-width: 0px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;

font-family: Arial;
font-size: smaller; 
}

nav li {
list-style-type: none;
padding: 3px; 
}

nav a:link {
color: white;
background-color: steelblue;
display: block;
text-decoration: none;
padding: 3px;
border-style: solid;
border-width: 1px;
border-color: black;
}

nav a:visited {
color: white;
background-color: steelblue;
display: block;
text-decoration: none;
padding: 3px;
border-style: solid;
border-width: 1px;
border-color: black;
}

nav a:hover {
background-color: lightskyblue;
color: black;
display: block;
text-decoration: none;
border-style: solid;
border-width: 1px;
border-color: black;
}

nav a:focus {
color: black;
background-color: white;
display: block;
text-decoration: none;
border-style: solid;
border-width: 1px;
border-color: black;
}

nav a:active {
color: black;
background-color: white;
display: block;
text-decoration: none;
border-style: solid;
border-width: 1px;
border-color: black;
}
} /* Ende von @media nicht löschen*/


Der CSS Code für die Datei “07_content.css“:

@media all {

main {

color: white;
background-color: cornflowerblue;
padding: 20px;
border-style: solid;
border-color: cornflowerblue;
border-width: 1px;
margin-top: 3px;
margin-right: 5px;
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: lightsteelblue;
padding: 5px;
border-style: solid;
border-color: black;
border-width: 1px;
background: linear-gradient(to right, white, lightskyblue); 
}

.clearingtext {
clear: both;
background-color: lightsteelblue;
}

.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_2wrapper.css“:

#wrapper2 {
margin: 5px;
padding: 3px;
background-color: cornflowerblue;
}

Webdesign Gruppe Peine:

Wer sich für HTML, CSS und PHP und alle anderen Webtechnologien interessiert, ist in der Webdesign-Gruppe-Peine genau richtig. Wenn Du Lust hast mitzumachen, dann melde dich einfach beim Fuhselab.

Von Torsten