cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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.

            
              <div class="grid-wrap">
	
	<div class="logo">
		<a href="#"><img src="http://via.placeholder.com/200x50?text=Logo Image" alt="logo image"></a>
	</div><!-- .logo -->
	
	
	<div class="nav-socials">
		<nav>
			<a href="#">Home</a> 
			<a href="#">About</a> 
			<a href="#">Contact</a>
		</nav>
		
		<div class="socials">
			<a href="#"><img src="http://via.placeholder.com/30x30?text=icon" alt="social media icon"></a> 
			<a href="#"><img src="http://via.placeholder.com/30x30?text=icon" alt="social media icon"></a> 
			<a href="#"><img src="http://via.placeholder.com/30x30?text=icon" alt="social media icon"></a>
		</div><!-- .socials -->
	</div><!-- .nav-socials -->
	
	
	<div class="hero">
		<img src="http://via.placeholder.com/600x250?text=Hero Graphic" alt="hero image">
	</div><!-- .hero -->
	
	
	<div class="sidebar">
		<ul>
			<li><a href="#">Sidebar Nav Item</a></li>
			<li><a href="#">Sidebar Nav Item</a></li>
			<li><a href="#">Sidebar Nav Item</a></li>
			<li><a href="#">Sidebar Nav Item</a></li>
		</ul>
	</div><!-- .sidebar -->
	
	
	<div class="main">
		<h1>Primary Headline Here</h1>
		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi adipisci veritatis quidem iusto eveniet possimus deleniti excepturi laborum, sint dolore tempore, perferendis aliquam. Earum officiis laboriosam, culpa veniam eius provident!</p>
		<div class="nested-row">
			<div>
				<a href="#"><img src="http://via.placeholder.com/150x100?text=Featured Image" alt="hero image"></a>
				<p><a href="#">Featured Article Title</a></p>
			</div>
			
			<div>
				<a href="#"><img src="http://via.placeholder.com/150x100?text=Featured Image" alt="hero image"></a>
				<p><a href="#">Featured Article Title</a></p>
			</div>
		</div><!-- .nested-row -->
	</div><!-- .main -->
	
	
	<div class="subfooter">
		<button>Call To Action Button</button>
	</div><!-- .subfooter -->
	
	
	<div class="footer">
		<p>Some copyright text would go here.</p>
		<p>
			<a href="#">Home</a> 
			<a href="#">About</a> 
			<a href="#">Contact</a>
		</p>
	</div><!-- .footer-area -->
	
</div><!-- .grid-wrap -->
            
          
!
            
              /* Intentionally using fancy css here. This will likely not work in internet explorer 7,8,9,10 */

* {
	box-sizing: border-box;
}

body { 
	color: #555; 
}

a {
	color: #06c;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

.logo img, 
.hero img {
	display: block;
}

.grid-wrap {
	max-width: 600px;
	margin: auto;
	display: grid;
	grid-template-columns: 200px auto;
	grid-template-rows: auto auto auto auto auto;
}

.logo {
	grid-column: 1/2;
	grid-row: 1;
	background: #aaa;
}

.nav-socials {
	grid-column: 2/3;
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	background: #aaa;
	padding: 0 10px;
}

.socials {
	margin-left: 15px;
}

.hero {
	grid-column: 1/3;
	grid-row: 2;
}

.sidebar {
	grid-column: 1/2;
	grid-row: 3;
	background: #e1e1e1;
}

.sidebar ul {
	list-style:none; 
	margin:0; 
	padding:20px;
}

.main {
	grid-column: 2/3;
	grid-row: 3;
	background: #eee;
	padding: 20px;
}

.nested-row {
	display: flex;
}

.nested-row > div {
	flex: 1 1 0%;
	padding: 0 10px;
}

.subfooter {
	grid-column: 1/3;
	grid-row: 4;
	background: #ccc;
	padding: 20px;
	text-align:center;
}

.footer {
	grid-column: 1/3;
	grid-row: 5;
	background: #aaa;
	display: flex;
	padding: 0 10px;
}

.footer > p {
	flex: 1 1 0%;
}

.footer > p:nth-child(2) {
	text-align:right;
}

@media(max-width:500px) {
	.grid-wrap {
		max-width: 600px;
		margin: auto;
		display: grid;
		grid-template-columns: 50% 50%;
		grid-template-rows: auto auto auto auto auto auto auto;
	}
	
	.logo {
		grid-column: 1/3;
		text-align:center;
	}
	
	.logo img {
		display: inline;
	}
	
	.nav-socials {
		grid-column: 1/3;
		grid-row: 2;
		justify-content: center;
	}
	
	.hero {
		grid-row: 3;
	}
	
	.main {
		grid-column: 1/3;
		grid-row: 4;
	}
	
	.sidebar {
		grid-column: 1/3;
		grid-row: 5;
	}
	
	.subfooter {
		grid-column: 1/3;
		grid-row: 6;
	}
	
	.footer {
		grid-column: 1/3;
		grid-row: 7;
		display: block;
	}
	
	.footer > p,
	.footer > p:nth-child(2) {
		text-align:center;
	}
}
            
          
!
999px
Loading ..................

Console