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

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.

              <p>⬇ Grid lines are the horizontal and vertical dividing lines of the grid.</p>
		<h1>CSS Grid Layout</h1>
		<h2>New Terminology</h2>
	<div data-grid="grid-column">4
		<p><strong>Grid Track (Column)</strong> A grid track is the space between two adjacent grid lines, forming a grid column or grid row.</p>
	<div data-grid="grid-area">6
		<p><strong>Grid Area</strong> A grid area consists of one or more adjecent grid cells. It is bound by four grid lines, one on each side of the grid area.</p>z
	<div data-grid="grid-cell">7
		<p><strong>Grid Cell</strong> The smallest A grid cell is the smallest unit of the grid. A grid cell is the intersection of a grid row and a grid column.</p> 
	<div data-grid="grid-row">12
		<p><strong>Grid Track (Row)</strong> A grid track is the space between two adjacent grid lines, forming a grid column or grid row.</p>



              main {
	display: grid;
	grid-gap: 16px;
	grid-template-columns: 10vw minmax(50px, 50vw) repeat(2, 1fr);	
	grid-template-rows: repeat(10, min-content);

[data-grid='grid-cell'] {
	border-color: rgb(255, 0, 72);
	&:hover {
		background: rgb(255, 0, 72);

[data-grid='grid-column'] {
	border-color: rgba(2, 143, 118, .8);
	grid-column: 4;
	grid-row: 1 / 6;
	&:hover {
		background: rgba(2, 143, 118, .8);

[data-grid='grid-area'] {
	border-color: rgb(138, 0, 84);
	grid-row: span 3;
	&:hover {
		background: rgb(138, 0, 84);

[data-grid='grid-row'] {
	background: rgba(255, 255, 255, .5);
	border-color: rgba(38, 95, 163, .8);
	grid-column: 1 / 5;
	grid-row: 5;
	&:hover {
		background: rgba(38, 95, 163, .8);

// Styles for fun
// -------------------------------------------------
@import url('https://fonts.googleapis.com/css?family=Scope+One|Open+Sans:700');

body {
	background: #fff;
	color: rgb(113, 115, 136);
	font-family: 'Scope One', sans-serif;
	font-size: 1rem;
	line-height: 1;
	margin: 1rem;	

h1, h2 {
	margin: 0;

div {
	border: 1px solid #ddd;
	padding: .75vw 1vw;

h1 {
	color: rgb(113, 115, 136);
	font-size: 4.5rem;
	font-weight: 700;
	padding-top: .5rem;

h2 {
	color: #999;
	font-size: 1.25rem;	

[data-grid]  {
	border-width: 1px;
	border-style: solid;

	&:hover {
		color: #fff;

a {
	color: #E4844A;

p {
	line-height: 1.5;

strong {
	display: block;
	font-family: "Open Sans", sans-serif;
	font-weight: 700;
	text-transform: uppercase;

footer {
	display: grid;
	grip-gap: 16px;
	grid-template-columns: 10vw minmax(50px, 50vw) 1fr 2fr;
	margin: 0 1rem;
	p {
		grid-column: 2 / 4;
		margin-bottom: 5rem;


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.


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