Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">

<head>

	<title>So richtig lecker!</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="keywords" content="kochen, cooking chef, genießen, backen, ausprobieren, thermomix, pampered chef">
	<link rel="stylesheet" type="text/css" href="master.css" />

</head>

<body>

	<!---Anfang Hauptcontainer--->
	<div id="haupt">
	
		<div id="header">
		
		
		
		</div>
		
		<div id="naviO">
		
			<ul>
				<li> <a href="index.php">Home</a> </li>
				<li> <a href="meinfuhrpark.php">Mein Fuhrpark</a> </li>
				<li> <a href="veranstaltungen.php">Veranstaltungen</a> </li>
				<li class="braun"> <a href="gaestebuch.php">G&auml;stebuch</a> </li>
				<li> <a href="kontakt.php">Kontakt</a> </li>
				<li> <a href="impressum.php">Impressum</a> </li>
				<li> <a href="videos.php">Videos</a> </li>
			</ul>
		
		</div>
		
		<div id="naviL">
			
			<ul>
				<li> <a href="asiagerichte.php">Asiagerichte</a> </li>
				<li> <a href="auflaeufe.php">Aufl&auml;ufe</a> </li>
				<li> <a href="beilagen.php">Beilagen</a> </li>
				<li> <a href="brot.php">Brot, Br&ouml;tchen</a> </li>
				<li> <a href="aufstrich.php">Brotaufstrich</a></li>
				<li> <a href="suppen.php">Eint&ouml;pfe, Suppen</a> </li>
				<li> <a href="fleisch.php">Fleisch</a> </li>
				<li> <a href="pasta.php">Pasta und Risotto</a> </li>
				<li> <a href="pizza.php">Pizza, Flammkuchen</a> </li>
				<li> <a href="salate.php">Salate</a> </li>
				<li> <a href="sossen.php">So&szlig;en</a> </li>
				<li> <a href="desserts.php">Desserts</a> </li>
				<li> <a href="kekse.php">Kekse, Geb&auml;ck</a> </li>
				<li> <a href="kuchen.php">Kuchen</a> </li>
				<li> <a href="waffeln.php">Waffeln</a> </li>
			</ul>
		
		</div>
		
		<div id="content">
		
			<h1>Mein G&auml;stebuch:</h1>
			
			<?php
			$pdo = new PDO('mysql:host=localhost;dbname=sorichtiglecker', 'root', '');
			$show_form = true; 
			$error = null;
 
			/*Das Formular wurde abgesendet, überprüfe den Inhalt und speichere es ab*/
			if(isset($_GET['submit'])) {
			$name = trim($_POST['name']);
			$email = trim($_POST['email']);
			$text = trim($_POST['text']);
 
			/*Überprüfen dass die E-Mail-Adresse gültig ist*/
			if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
			$error = 'Bitte eine gültige E-Mail-Adresse eingeben<br>';
			} else if(empty($name)) {
			$error = 'Bitte einen Namen eingeben<br>';
			} else if(empty($text)) {
			$error = 'Bitte einen Text eingeben<br>'; 
			} else {
			$statement = $pdo->prepare("INSERT INTO gaestebuch (name, email, text) VALUES (:name, :email, :text)");
			$result = $statement->execute(array('name' => $name, 'email' => $email, 'text' => $text));
 
			if($result) {
			echo "<div style=\"margin-left: 15px; color: #8A4B08;\">Dein Eintrag wurde erfolgreich gespeichert</div><br><br>";
			$show_form = false;
			} else {
			$error = 'Beim Abspeichern ist leider ein Fehler aufgetreten<br>';
			}
			}
			}
			?>
 
			<?php 
			if(!is_null($error)) { /*Ein Fehler ist aufgetreten*/
			echo $error;
			}
 
			/*Ausgabe des Formulars nur wenn $showForm == true ist*/
			if($show_form): 
			?>
			<form action="?submit=1" method="post">
				<p>Name: <input class="eingabe" type="text" size="40" maxlength="250" name="name"/></p>
				<p>E-Mail: <input class="mail" type="email" size="40" maxlength="250" name="email"/></p>
				<p>
				
					Dein Eintrag:<br />
					<textarea class="gesch" cols="80" rows="5" name="text"></textarea>
				
				</p>
				
				<p><input class="sub" type="submit" value="Ins G&auml;stebuch eintragen" /></p>
			
			</form> 
			<?php 
			endif;
			?>
 
			<hr>
 
			<?php 
			/* Ausgabe der Einträge*/
 
			/*Ermittelt die Anzahl der Beiträge*/
			$statement = $pdo->prepare("SELECT COUNT(*) AS anzahl FROM gaestebuch WHERE deleted_at IS NULL");
			$statement->execute();
			$row = $statement->fetch();
			$anzahl_eintrage = $row['anzahl'];
			echo "<div style=\"margin-left: 15px; color: #8A4B08;\">$anzahl_eintrage Personen sind eingetragen</div><br><br>";
 
 
			/*Berechne alles notwendige für die Blätterfunktion*/
			$seite = 1;
			if(isset($_GET['seite'])) {
			$seite = intval($_GET['seite']);
			}
 
			$beitraege_pro_seite = 20;
			$start = ($seite-1)*$beitraege_pro_seite;
 
			/*Abfrage der Datenbank und Ausgabe der Daten*/
			$statement = $pdo->prepare("SELECT * FROM gaestebuch WHERE deleted_at IS NULL ORDER BY id DESC LIMIT :start, :limit");
			$statement->bindParam(':start', $start, PDO::PARAM_INT);
			$statement->bindParam(':limit', $beitraege_pro_seite, PDO::PARAM_INT);
			$statement->execute();
			while($row = $statement->fetch()) {
			$name = htmlentities($row['name']);
			$email = htmlentities($row['email']);
			$text = nl2br(htmlentities($row['text']));
			$date = new DateTime($row['created_at']);
			$dateFormatted = $date->format('d.m.y H:i');
 
			echo "<div style=\"border: 1px solid #8A4B08; margin-left: 15px; margin-right: 35px\">
			<div style=\"border-bottom: 1px solid #8A4B08;  color: #8A4B08; padding-left: 5px;padding-top: 2px; padding-bottom: 2px;\">$dateFormatted von $name</a></div>
			<div style=\"color: #8A4B08; padding: 5px;\">$text</div>
			</div><br>";
 
			}
 
			/*Berechne die Anzahl der Seiten:*/
			$anzahl_seiten = ceil($anzahl_eintrage / floatval($beitraege_pro_seite));
 
			/*Ausgabe der Seitenlinks:*/
			echo "<div style=\"text-align: center; color: #8A4B08;\">";
			echo "<b>Seite:</b> ";
 
 
			/*Ausgabe der Links zu den verschiedenen Seiten*/
			for($a=1; $a <= $anzahl_seiten; $a++) {
			/*Wenn der User sich auf dieser Seite befindet, keinen Link ausgeben*/
			if($seite == $a){
			echo " <b>$a</b> ";
			} else { /*Aus dieser Seite ist der User nicht, also einen Link ausgeben*/
			echo " <a href=\"?seite=$a\">$a</a> ";
			}
			}
			echo "</div>";
 
		?>
				
				
				
		</div>
		
		<div id="bilder" >
			<div id="gallery" >
				<a href="banxeo.php"><img src="links/AsiaVietCrepe.jpg" alt="VietnamesischerCrepe" /></a>
				<a href="fruehling.php"><img src="links/AsiaFruel.jpg" alt="Fruehlibgsrolle" /></a>
				<a href="pfannenge.php"><img src="links/AsiaRindPfanneAndrea.jpg" alt="Asiarinderpfanne" /></a>
				<a href="broklanuau.php"><img src="links/AufBrokLaNu.jpg" alt="BrokkoliNudelAuflauf" /></a>
				<a href="tortelliniauf.php"><img src="links/AufMuttisTortelli.jpg" alt="MuttiTortelliniAuflauf" /></a>
				<a href="schntortellauf.php"><img src="links/AufSchnelTortelli.jpg" alt="SchnellerTortelliniAuflauf" /></a>
				<a href="ulroesti.php"><img src="links/BeilRoestUlmArt.jpg" alt="RoestiUlmerArt" /></a>
				<a href="bierhonigbrot.php"><img src="links/BrotBierHonig.jpg" alt="BierHonigBrot" /></a>
				<a href="kartoffelbrot.php"><img src="links/BrotFeinKartoffel.jpg" alt="FeinesKartoffelbrot" /></a>
				<a href="haselhorn.php"><img src="links/BrotHasselnHoernch.jpg" alt="Haselnusshoernchen" /></a>
				<a href="landbrot.php"><img src="links/BrotLand.jpg" alt="Landbrot" /></a>
				<a href="kaesebroetchen.php"><img src="links/BrotKaeseBroetch.jpg" alt="LeckerKaesebroetchen" /></a>
				<a href="biggreek.php"><img src="links/BrotBigGreek.jpg" alt="BigGreek" /></a>
				<a href="leckerebutter.php"><img src="links/BroAufsButter.jpg" alt="LeckerButter" /></a>
				<a href="eiersalat.php"><img src="links/BroAufsEiersalat.jpg" alt="Eiersalat" /></a>
				<a href="skagenrora.php"><img src="links/BroAufsSkagenRora.jpg" alt="SkagenR&ouml;ra" /></a>
				<a href="schngemues.php"><img src="links/SupSchnellGemue.jpg" alt="SchnelleGemuesesuppe" /></a>
				<a href="gefupapr.php"><img src="links/FleiGefuelPapri.jpg" alt="GefuelltePaprika" /></a>
				<a href="pohapfa.php"><img src="links/FleiPorrHackPfan.jpg" alt="PorreeHackPfanne" /></a>
				<a href="schmobra.php"><img src="links/FleiSchmoBrat.jpg" alt="SchmorgurkenBratwurstbaellchen" /></a>
				<a href="slavinken.php"><img src="links/FleiSlavPika.jpg" alt="Slavinkenpikant" /></a>
				<a href="genudpf.php"><img src="links/GeNuPf.jpg" alt="GemueseNudelPfanne" /></a>
				<a href="pfinuschi.php"><img src="links/PastaPfiffNudSchin.jpg" alt="PfifferlingNudelSchinkenPfanne" /></a>
				<a href="rurischi.php"><img src="links/PastRuccRissotSchin.jpg" alt="RuccollaSchinkenRissotto" /></a>
				<a href="amstypizza.php"><img src="links/PizzAmerSty.jpg" alt="AmericanStylePizza" /></a>
				<a href="apfelflamm.php"><img src="links/PizzApfelFlamm.jpg" alt="ApfelFlammkuchen" /></a>
				<a href="sabaso.php"><img src="links/SossSahBac.jpg" alt="Sahne Bacon So&szlig;e" /></a>
				<a href="whiseis.php"><img src="links/DesWhiskEis.jpg" alt="WhiskyEis" /></a>
				<a href="amcosm.php"><img src="links/KekAmercCooSma.jpg" alt="AmericanCookies" /></a>
				<a href="baiser.php"><img src="links/KekBaiser.jpg" alt="KekBaiser" /></a>
				<a href="markus.php"><img src="links/KekMarzipKuess.jpg" alt="MarzipanKuesschen" /></a>
				<a href="zitronenmuff.php"><img src="links/KekZitroMuffi.jpg" alt="Zitronenmuffin" /></a>
				<a href="baipflaume.php"><img src="links/KuBaisPflau2.jpg" alt="BaiserPflaumenKuchen" /></a>
				<a href="apfelkuchen.php"><img src="links/KuLiebApfel.jpg" alt="LieblingsApfelkuchen" /></a>
				<a href="pfihistreusel.php"><img src="links/KuPfirHim.jpg" alt="PfirsichHimbeerKuchen" /></a>
				<a href="stracciatellakuchen.php"><img src="links/KuStraciat.jpg" alt="StraciatellaKuchen" /></a>
				<a href="streuselkuchen.php"><img src="links/KuStreusel.jpg" alt="StreuselKuchen" /></a>
				<a href="apfelwaffel.php"><img src="links/WaffApfel.jpg" alt="ApfelWaffeln" /></a>
				<a href="kaschiwaffeln.php"><img src="links/schinkwaff.jpg" alt="Schinkenwaffeln" /></a>
			</div>
		</div>
		
		
		
		









	</div>

</body>

</html>
              
            
!

CSS

              
                *{
	margin: 0;
	padding: 0;
}

body {
	font-family: Arial, Verdana, Geneva, Helvetica, sans-serif;
	font-size: 14px;
	background-color: #F7F2E0;
	background-image: url(links/pizzadoppelt.jpg);
	background-position: left top;
	background-repeat: no-repeat;
}

#haupt {
	position: relative;
	width: 1000px;
	margin: 0 auto;
	background-color: #FBF8EF;
	min-height: 1650px;
}

#header {
	position: relative;
	width: 998px;
	height: 200px;
	top: 0px;
	background-image: url(links/SpeisenTisch.jpg);
	background-position: left top;
	background-repeat: no-repeat;
	background-color: #000000;
	border-right: 1px solid #8A4B08;
	border-left: 1px solid #8A4B08;
	border-top: 1px solid #8A4B08;
}

#naviO {
	position: absolute;
	width: 998px;
	height: 30px;
	left: 0px;
	top: 200px;
	padding-top: 10px;
	padding-bottom: 7px;
	background-color: #F7F2E0;
	border: 1px solid #8A4B08;
}

#naviO ul {
	list-style-type: none;
	margin-left: 125px;
}

#naviO ul li {
	float: left;
	margin-left: 35px;
	margin-top: 7px;
	border-bottom: 1px solid #8A4B08;
	border-right: 1px solid #8A4B08;
}

#naviO ul li a {
	color: #8A4B08;
	text-decoration: none;
	font-size: 12px;
	padding: 2px 4px; /*klappt nur wenn man aus dem inline ein block macht*/
	display: block;
	text-align: center;
}

#naviO ul li:hover {
	border-bottom: 1px solid #8A4B08;
	border-right: 1px solid #8A4B08;
}

#naviO ul li a:hover {
	color: #ffffff;
	background-color: #8A4B08;
}

#naviO ul li.braun a {
	color: #ffffff;
	background-color: #8A4B08;
}

#naviL {
	margin-top: 52px;
	min-height: 300px;
}

#naviL ul {
	margin: 0;
	padding: 0;
}

#naviL li {
	list-style: none;
	font-size: 12px;
	position: relative;
	margin: 0 0 3px 0;
	padding: 0;
	width: 140px;
	border-right: 1px solid #8A4B08;
	border-bottom: 1px solid #8A4B08;
}



#naviL  > ul > li.braun a {
	background-color: #F6E3CE;
	color: #B45F04;
}

#naviL > ul > li.dunkbraun a {
	background-color: #8A4B08;
	color: #F7F2E0;
}

#naviL > ul > li.braun:hover  a{
  background: #8A4B08;
}

#naviL a {
	display: block;
	padding: 6px;
	text-decoration: none;
	color: #8A4B08;
	background-color: #F7F2E0;
	text-align: center;
}

#naviL ul li .braun {
	color: #F7F2E0;
}

#naviL ul li a:hover {
	color: #F7F2E0;
	background-color: #8A4B08;
}

#content{
	position: absolute;
	left: 145px;
	top: 252px;
	min-height:835px;
	width: 710px;
	background-color: #F7F2E0;
	font-size: 12px;
	border: 1px solid #8A4B08;
}

#content h1 {
	font-size: 18px;
	color: #8a4b08;
	margin-top: 10px;
	margin-left: 15px;
	margin-bottom: 10px;
}

#content h4 {
	color: #8a4b08;
	margin-top: 10px;
	margin-left: 15px;
}

#content p {
	margin-left: 15px;
	margin-top: 5px;
	margin-right: 20px;
}

#content p a {
	color: #8a4b08;
}

#content p a strong {
	font-weight: bold;
}

#content p.absatz {
	margin-bottom: 20px;
}

#content.tabelle {
	position: absolute;
	left: 145px;
	top: 300px;
}

#content table.tabelle {
	margin-left: 15px;
}

#content table.tabelle tr th {
	font-size: 13px;
	color: #8a4b08;	
}

#content table.tabelle h4 {
	font-size: 12px;
	color: #8a4b08;
}

#content table.tabelle tr td {
	color: #8a4b08;
}

#content table.tabelle strong {
	font-weight: bold;
	font-size: 12px;
}

#content table.text {
	margin-left: 15px;
	margin-bottom: 20px;
}

#content table.text h4 {
	font-size: 12px;
	color: #8a4b08;
}

#content table.text tr th {
	font-size: 12px;
	color: #8a4b08;
}

#content table.text tr td {
	color: #8a4b08;
}

#content table.text strong {
	font-weight: bold;
}

#content img {
	width: 400px;
	margin-top: 5px;
	border: 1px solid #8A4B08;
	
}

#content form {
	background-color: #F7F2E0;
	margin-top: 20px;
	margin-left: 0px;
}

#content form p {
	color: #8A4B08;
	text-align: left;
	padding-bottom: 5px;
}

#content form .eingabe{
	margin-left: 7px;
	background-color: #F6E3CE;
}

#content form .mail {
	margin-left: 5px;
	background-color: #F6E3CE;
}

#content form .gesch {
	background-color: #F6E3CE;
}

#content form .sub {
	background-color: #8A4B08;
	width: 160px;
	padding-top: 3px;
	padding-bottom: 3px;
	color: #F6E3CE;
}


/*Bereich Gallery*/
#gallery {
	position: absolute;
	left: 862px;
	top: 252px;
	background-color: #8A4B08;
	width: 136px;
	height: 835px;
	overflow: auto;
	/*Bilder innerhalb des Fensters zentrieren*/
	text-align: center;
	border: 1px solid #8A4B08;
} 

#gallery img {
	width: 116px;
	height: 65px;
	border: 1px solid #cccccc;
}
              
            
!

JS

              
                
              
            
!
999px

Console