Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
	<div class="box two">
		<h2>2</h2>
		<h3>Ginelle</h3>
		<img src="http://gregandselena.com/assets/img/ginelle-first-day.png" alt="Ginelle on her first day of Kindergarten" />
		<p>Lots of milestones: graduation from Pre-K, first day of school, first lost tooth, and an exteremly short-lived soccer career.</p>

		<img src="http://gregandselena.com/assets/img/ginelle-graduating.jpg" alt="Ginelle graduating from Pre-K" />

		<img src="http://gregandselena.com/assets/img/ginelle-soccer.jpg" alt="Ginelle playing soccer" />

		<figcaption>She's the one that looks ready for snack-time.</figcaption>
	</div>
              
            
!

CSS

              
                

* { box-sizing: border-box; }

body {
  margin: 4rem;
  background-color: #efefef;
  color: #444;
  font: 1.4em Arial, sans-serif;
}


.box.two {
  margin: 0 auto;
  padding: 2rem;
  width: 20em; 
  background-color: #fff;
  border-radius: 5px;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.14);
  position: relative;
  
  
  // Setting the Internal Grid  -------------- //
	display: grid;
	grid-gap: 5px;
	grid-template-areas: 
    "number image1"
	  "title image1"
	  "content image1"
	  "content image2"
		"content figcaption";

  
	 	img[src*="graduating"] { 
	 		min-width: 100px;
      max-width: 100%;
	 		grid-area: image1;  // Setting as grid area //
	 	}
	 	img[src*="soccer"] {
      max-width: 100%;
	 		grid-area: image2;  // Setting as grid area //
	 	}
  	h2 {
			grid-area: number; // Setting as grid area // 
	 		font-size: 500%;
	 		line-height: 0.9;
	 		margin: 0;
	 		padding: 0;
	 		align-self: start; // Setting v-align //
	 		justify-self: start; // Setting h-align //
	 	}
	 	h3 {
			grid-area: title; // Setting as grid area //
	 		align-self: start;
	 		justify-self: start;
      margin: 0;
      padding: 0;
      color: #000;
      font-size: 160%;
      text-transform: uppercase;
	 	}
	 	p {
			grid-area: content; 
			font-size: 90%;
	 		align-self: start;
	 		justify-self: start;
	 		padding-right: 3rem;
      max-width: 80%
	 	}
	 	img[src*="first-day"] { 
			position: absolute;
			bottom: 0px;
			right: 23%;
			height: auto;
			width: 220px;
		}
		figcaption {
	 		grid-area: figcaption; 
	 		padding-left: 70px;
			text-align: right;
      font-size: 70%;
      line-height: 1;
      margin-bottom: 1rem;
      &:before {
        content: "▲";
        color: #8dc53f;
      }
		}
}
              
            
!

JS

              
                
              
            
!
999px

Console