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="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>
            
          
!

CSS

            
              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;
}

            
          
!

JS

            
              
            
          
!
999px

Console