Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="page">
 <div id="header" class="header fak0bg">
	 <div id="banner" class="banner">
		<strong>Hochschule<br/>
			Hannover</strong><br/> University of<br/> Applied Sciences<br/> and Arts
	 </div>
	 <div id="menu-switch" class="menu-switch">≡</div>
 </div>
 <div id="menu" class="menu fak0bg">
  <div class="menu-container">
   <div id="fak1" class="menu-small fak1bg">
    Fakultät I<br/> Elektro- und Informationstechnik
   </div>
   <div id="fak2" class="menu-small fak2bg">
    Fakultät II<br/> Maschinenbau und Bioverfahrenstechnik
   </div>
  </div>
  <div class="menu-container">
   <div id="fak3" class="menu-big fak3bg">
    Fakultät III<br/> Medien, Information und Design
   </div>
  </div>
  <div class="menu-container">
   <div id="fak4" class="menu-small fak4bg">
    Fakultät IV<br/> Wirtschaft und Informatik
   </div>
   <div id="fak5" class="menu-small fak5bg">
    Fakultät V<br/> Diakonie, Gesundheit und Soziales
   </div>
  </div>
 </div>
 <div id="content" class="content fak0bg">
  <h1 id="greeting">Willkommen an der Hochschule Hannover</h1>
	<p>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
	 <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
	 <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
	 <p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
	 <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>
	 <p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>
	 <p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
 </div>
</div>
              
            
!

CSS

              
                /* Farben */
.fak0bg {
  background-color: rgb(87,82,80);
}
.fak1bg {
  background-color: rgb(30,190,235);
}
.fak2bg {
  background-color: rgb(150,190,0);
}
.fak3bg {
  background-color: rgb(255,165,0);
}
.fak4bg {
  background-color: rgb(220,60,5);
}
.fak5bg {
  background-color: rgb(210,60,155);
}

/* Seitenkörper */
body {
  background-color: black;
	font-family: Arial;
	font-size: 15px;
	color: white;
  overflow-y: scroll;
}

/* Absatz */
p {
  margin: 0;
  padding: 0.2em 0;
  text-indent: 0em;
}

/* Seite */
div.page{
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
	min-width: 300px;
}

div.header {
  height: 90px;
  margin: 5px 0px;
  padding: 10px;
	font-size: 15px;
}

	div.banner {
		float: left;
		height: 100%;
		cursor: pointer;
		text-transform: uppercase;
	}

/* Menü */
	div.menu-switch {
		float: right;
		font-size: 75px;
		height: 100%;
		cursor: pointer;
	}

div.menu {
  display: none;
  height: 300px;
  margin: 5px 0px 5px 0px;
  text-align: right;
	font-size: 15px;
}
div.menu-container {
  float: left;
  width: 300px;
  height: 300px;
}

div.menu-small, div.menu-big {
	float: left;
  width: 280px;
	margin: 5px;
  padding: 5px;
	cursor: pointer;
	overflow: hidden;
}

div.menu-small {
  height: 130px;
}

div.menu-big {
  height: 280px;
}

/* Inhalt */
div.content {
  margin: 5px 0px 0px 0px;
  padding: 10px;
	hyphens: auto;
	text-align: justify;
}
              
            
!

JS

              
                $(document).ready(function() {
	// # Menü
	// ## Umschalter fürs Menü
	$("#menu-switch").click(function() {
		$("#menu").slideToggle(500);
	});
	$("#menu-switch").mouseover(function() {
		$("#menu-switch").fadeTo(500, "0.5");
	});
	$("#menu-switch").mouseout(function() {
		$("#menu-switch").fadeTo(500, "1.0");
	});

	// ## Menüpunkte
	// erstmalige Initialisierung
	$("#fak1").css("opacity", "0.5");
	$("#fak2").css("opacity", "0.5");
	$("#fak3").css("opacity", "0.5");
	$("#fak4").css("opacity", "0.5");
	$("#fak5").css("opacity", "0.5");
	
	// ## Interaktionen der Menüpunkte mit der Maus
	// ### Banner
	$("#banner").click(function() {
		$("#header").animate({backgroundColor: "rgb(87,82,80)",}, 1000 );
		$("#greeting").html("Willkommen an der Hochschule Hannover");
		$("#menu").slideUp(500);
	});
	$("#banner").mouseover(function() {
		$("#banner").fadeTo(500, "0.5");
	});
	$("#banner").mouseout(function() {
		$("#banner").fadeTo(500, "1.0");
	});
	
	// ### Menüpunkte
	$("#fak1").mouseover(function() {
		$("#fak1").fadeTo(500, "1.0");
	});
	$("#fak1").mouseout(function() {
		$("#fak1").fadeTo(500, "0.5");
	});
	$("#fak1").click(function() {
		$("#header").animate({backgroundColor: "rgb(30,190,235)",}, 1000 );
		$(".menu").slideUp(500);
		$("#greeting").html(
			"Willkommen an der Fakultät I<br/>Elektro- und Informationstechnik"
		);
	});
	$("#fak2").mouseover(function() {
		$("#fak2").fadeTo(500, "1.0");
	});
	$("#fak2").mouseout(function() {
		$("#fak2").fadeTo(500, "0.5");
	});
	$("#fak2").click(function() {
		$("#header").animate({backgroundColor: "rgb(150,190,0)",}, 1000 );
		$(".menu").slideUp(500);
		$("#greeting").html(
			"Willkommen an der Fakultät II<br/>Maschinenbau und Bioverfahrenstechnik"
		);
	});

	$("#fak3").mouseover(function() {
		$("#fak3").fadeTo(500, "1.0");
	});
	$("#fak3").mouseout(function() {
		$("#fak3").fadeTo(500, "0.5");
	});
	$("#fak3").click(function() {
		$("#header").animate({backgroundColor: "rgb(255,165,0)",}, 1000 );
		$(".menu").slideUp(500);
		$("#greeting").html(
			"Willkommen an der Fakultät III<br/>Medien, Information und Design"
		);
	});

	$("#fak4").mouseover(function() {
		$("#fak4").fadeTo(500, "1.0");
	});
	$("#fak4").mouseout(function() {
		$("#fak4").fadeTo(500, "0.5");
	});
	$("#fak4").click(function() {
		$("#header").animate({backgroundColor: "rgb(220,60,5)",}, 1000 );
		$(".menu").slideUp(500);
		$("#greeting").html(
			"Willkommen an der Fakultät IV<br/>Wirtschaft und Informatik"
		);
	});

	$("#fak5").mouseover(function() {
		$("#fak5").fadeTo(500, "1.0");
	});
	$("#fak5").mouseout(function() {
		$("#fak5").fadeTo(500, "0.5");
	});
	$("#fak5").click(function() {
		$("#header").animate({backgroundColor: "rgb(210,60,155)",}, 1000 );
		$(".menu").slideUp(500);
		$("#greeting").html(
			"Willkommen an der Fakultät V<br/>Diakonie, Gesundheit und Soziales"
		);
	});
	// # Menübreite
	var pageWidth = $(".page").width();
	menuWidth(pageWidth);
	
	function menuWidth(pageWidth){
		$(".menu").css("height", (pageWidth / 3) + "px");
		$(".menu-container").css("width", (pageWidth / 3) + "px");
		$(".menu-container").css("height", (pageWidth / 3) + "px");
		$(".menu-small").css("width", (pageWidth / 3 - 20) + "px");
		$(".menu-small").css("height", (pageWidth / 6 - 20) + "px");
		$(".menu-big").css("width", (pageWidth / 3 - 20) + "px");
		$(".menu-big").css("height", (pageWidth / 3 - 20) + "px");
	}
	
	$(window).resize(function(){
		var pageWidth = $(".page").width();
		menuWidth(pageWidth);
	});
});
              
            
!
999px

Console