cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <html>
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Best City Guide</title>
</head>
<body>
		<header class="main-header">
		<div class="container clearfix">
			<h1 class="name"><a href="#">Best City Guide</a></h1>
			<ul class="main-nav">
				<li><a href="#">ice cream</a></li>
				<li><a href="#">donuts</a></li>
				<li><a href="#">tea</a></li>
				<li><a href="#">coffee</a></li>
			</ul>
		</div>
	</header><!--/.main-header-->   

	<div class="banner">
		<img class="logo" src="http://lilianabrissos.com/img/projects/city-logo.svg" alt="City">
		<h1 class="headline">The Best City</h1>
		<span class="tagline">The best drinks and eats in the best city ever.</span>
	</div><!--/.banner-->

	<div class="container clearfix">
		
		<div class="secondary col">
			<h2>Welcome!</h2>
			<p>Everything in this city is worth waiting in line for.</p>
			<p>Cupcake ipsum dolor sit. Amet chocolate cake gummies jelly beans candy bonbon brownie candy. Gingerbread powder muffin. Icing cotton candy. Croissant icing pie ice cream brownie I love cheesecake cookie. Pastry chocolate pastry jelly croissant.</p>
			<p>Cake sesame snaps sweet tart candy canes tiramisu I love oat cake chocolate bar. Jelly beans pastry brownie sugar plum pastry bear claw tiramisu tootsie roll. Tootsie roll wafer I love chocolate donuts.</p>
		</div><!--/.secondary-->
		
		<div class="primary col">
			<h2>Great food</h2>
			
			<!--featured image-->
			<figure>
				<img class="icon-location" src="http://lilianabrissos.com/img/projects/location.svg" alt="Location">
				<img class="feat-img" src="http://lilianabrissos.com/img/projects/treats.svg" alt="Drinks and eats">
				<figcaption>
					<h4>Featured Drinks &amp; Eats!</h4>
					Croissant macaroon pie brownie cookie marshmallow liquorice gingerbread caramels toffee.
				</figcaption>
			</figure>
			
			<p>Croissant macaroon pie brownie. Cookie marshmallow liquorice gingerbread caramels toffee I love chocolate. Wafer lollipop dessert. Bonbon jelly beans pudding dessert sugar plum. Marzipan toffee drag&#233;e chocolate bar candy toffee pudding I love. Gummi bears pie gingerbread lollipop.</p>
		</div><!--/.primary-->
		
		<div class="tertiary col">
			<h2>How to get here</h2>
			<p><strong>Plane: </strong>Tiramisu caramels gummies chupa chups lollipop muffin. Jujubes chocolate caramels cheesecake brownie lollipop drag&#233;e cheesecake.</p>
			<p><strong>Train: </strong>Pie apple pie pudding I love wafer toffee liquorice sesame snaps lemon drops. Lollipop gummi bears dessert muffin I love fruitcake toffee pie.</p>
			<p><strong>Car: </strong>Jelly cotton candy bonbon jelly-o jelly-o I love. I love sugar plum chocolate cake pie I love pastry liquorice.</p>
		</div><!--/.tertiary-->	
		
	</div><!--/.container-->

	<footer class="main-footer">
		<span>&copy;2015 Residents of The Best City Ever.</span>
	</footer>
	
</body>
</html>
            
          
!
            
              /* ================================= 
  Base Element Styles
==================================== */

* {
	box-sizing: border-box;
}

body {
	font-family: 'Varela Round', sans-serif;
	line-height: 1.6;
	color: #3a3a3a;
}

p {
	font-size: .95em;
	margin-bottom: 1.8em;
}

h2,
h3,
a {
	color: #093a58;
}

h2,
h3,
h4 {
	margin-top: 0;
}

h4 {
	margin-bottom: .4em;
}

a {
	text-decoration: none;
}

img {
	max-width: 100%;
}

figure {
	margin: 0;
	line-height: 0;
	position: relative;
}

figcaption {
	font-size: .9em;
	line-height: 1.5;
	color: #fff;
	padding: 1em;	
	background: rgba(19,43,102, .85);
	
	position: absolute;
	bottom: 0;
	width: 100%;
}

/* ================================= 
  Base Layout Styles
==================================== */

/* ---- Navigation ---- */

.name {
	font-size: 1.25em;
	margin: 0;
}

.main-nav {
	margin-top: 5px;
}

	.name a,
	.main-nav a {
		display: block;
		text-align: center;
		padding: 10px 15px;
	}
	
	.main-nav a {
		font-size: .95em;
		color: #3acec2;
		text-transform: uppercase;
	}

	.main-nav a:hover {
		color: #093a58;
	}

/* ---- Layout Containers ---- */

.main-header {
	padding-top: .5em;
	padding-bottom: .5em;
}

.banner,
.main-footer {
	text-align: center;
}

.banner {
	color: #fff;
	background: #3acec2;
	padding: 3.2em 0;
	margin-bottom: 60px;
}

.col {
	padding-right: 1em;
	padding-left: 1em;
}

.main-footer {
	background: #d9e4ea;
	padding: 2em 0;
	margin-top: 30px;
}

/* ---- Page Elements ---- */

.logo {
	width: 190px;
}

.headline {
	margin-bottom: 0;
}

.icon-location {
	width: 35px;
	position: absolute;
	top: -15px;
	right: -15px;
	z-index: 2;
}

/* ================================= 
  Media Queries
==================================== */

@media (min-width: 769px) {

	body {
		padding-top: 68px;
	}

	.main-header {
		position: fixed;
		background: #fff;
		box-shadow: 0 1px 4px rgba(0,0,0,.4);
		width: 100%;
		top: 0;
		z-index: 1000;
	}

	.container {
		width: 90%;
		margin: 0 auto;
	}

	.name,
	.col {
		float: left;
	}

	.primary,
	.secondary {
		width: 50%;
	}

	.main-nav {
		float: right;
	}

	.main-nav li {
		display: inline-block;
		margin-left: 15px;
	}

	.tagline {
		font-size: 1.4em;
	}

	/* ---- Float clearfix ---- */

	.clearfix::after {
		content: " ";
		display: table;
		clear: both;
	}

}

@media (min-width: 1025px) {
	
	.container {
		width: 80%;
		max-width: 1150px;
	}

	.primary {
		width: 40%;
	}

	.secondary,
	.tertiary {
		width: 30%;
	}

}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console