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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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 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.

            
              <div class="gridContainer">
  <div class="cell photoMain"></div>
  <div class="cell textTop">To accept your country without betraying it, you must love it for that which shows what it might become. America -- this monument to the genius of ordinary men and women, this place where hope becomes capacity, this long, halting turn of 'no' into the 'yes' -- needs citizens who love it enough to re-imagine and re-make it.</div>
  <div class="cell textBottom">We have a market-driven society so obsessed with buying and selling and obsessed with power and pleasure and property, it doesn't leave a whole lot of time for non-market values and non-market activity so that love and trust and justice, concern for the poor, that's being pushed to the margins, and you can see it.</div>
	<div class="cell textOverlay"><p>Brother Cornel West, in a print by Sheperd Fairey.</p></div>
</div>
            
          
!
            
              html {
/*	border: 3px double gold;*/
	padding:0px;
}

body {
/*	border: 3px double red; */
	width:800px;
	margin: 0 auto;
	margin-top: 0;
	margin-bottom: 0;
}

.gridContainer {
	display: grid;
	grid-gap: 0px;
	grid-template-columns: repeat(8, 1fr);
	grid-template-rows: repeat(8, 1fr);
	background-color: #ddd;
	color: #444;
	font-family:Helvetica,Arial,sans-serif;
}

.cell {
/*	border:2px dotted blue;*/
	background-color: black;
	padding: 10px 20px;
}

.photoMain {
		background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/534020/CWest.png); 
  background-size: cover;
	background-position:center;
	grid-column-start:1 ;
	grid-column-end:5 ;
	grid-row-start:1 ;
	grid-row-end:9 ;
}

.textTop {
	grid-column-start:5 ;
	grid-column-end:9 ;
	grid-row-start:1 ;
	grid-row-end:5 ;
	color:gold;
	background-color:brown;
	letter-spacing:-0.025em;
	font-weight:900;
	line-height:150%;
	font-size:2.5vw;
}
.textBottom {
	grid-column-start:5 ;
	grid-column-end:9 ;
	grid-row-start:5 ;
	grid-row-end:9 ;
	color:white;
	background-color:rebeccapurple;
		letter-spacing:-0.025em;
	font-weight:900;
	line-height:150%;
	font-size: 2.5vw;
}
.textOverlay{
	grid-column-start:2;
	grid-column-end:5;
	grid-row-start:7;
	grid-row-end:8;
	background-color: rgba(245,245,245, 0.85);
	/* below, the 4 values correspond to roughly
	10 o'clock, 2 o'clock, 
	4 o'clock, and 8 o'clock;
	setting them at 10px 0px 0px 10px
	gives me a bar with a rounded left side
	and a flat right side. */
	border-radius:10px 0px 0px 10px;
	padding: 0 10px;
	font-weight:800;
}

.textOverlay p{
	color:#444;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console