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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                <section>
		<figure>
 			<img src="img/composition2.png" alt="Composition II, 1929" />
 			<figcaption>Composition II, 1929</figcaption>
		</figure>
		<div class="frame" id="composition2">
			<div class="row">
				<div class="box container">
					<div class="box"></div>
					<div class="box"></div>
				</div>
				<div class="box red"></div>
			</div>
			<div class="row">
				<div class="box blue"></div>
				<div class="box"></div>
				<div class="box container">
					<div class="box black"></div>
					<div class="box yellow"></div>
				</div>
			</div>
		</div>
	</section>

	<section>
		<figure>
 			<img src="img/tableau1.png" alt="Tableau I, 1921" />
 			<figcaption>Tableau I, 1921</figcaption>
		</figure>
		<div class="frame" id="tableau1">
			<div class="row">
				<div class="box container">
					<div class="box red"></div>
					<div class="box"></div>
				</div>
				<div class="box"></div>
				<div class="box container">
					<div class="box black"></div>
					<div class="box"></div>
					<div class="box"></div>
				</div>
			</div>
			<div class="row">
				<div class="box"></div>
				<div class="box">
					<div class="row">
						<div class="box">
							<div class="box blue"></div>
							<div class="box"></div>
						</div>
						<div class="box"></div>
					</div>
					<div class="row">
						<div class="box"></div>
						<div class="box black"></div>
					</div>
				</div>
				<div class="box yellow"></div>
			</div>
		</div>

	</section>
              
            
!

CSS

              
                /* Page settings */
		html {
			padding-bottom: 40px;
		}

		section {
			padding: 60px 30px;
			clear: both;
		}		

		section > * {
			float: left;
		}

		section figure {
			width: 30%;
		}

		section figure img {
			width: 50%;
		}

		/* Frame general settings */
		.frame {
			width: 500px;
			height: 500px;
			margin: 0 auto;
			border: 1px solid #ddd;
		}

		.box {
			height: 100%;
			background: #fff;
			box-sizing: border-box;
		}

		.row {
			box-sizing: border-box;
			clear: both;
		}

		.row > .box {
			float: left;
		}
		
		/* Colors */
		.red {
			background: rgb(179, 58, 50)
		}

		.blue {
			background: rgb(37, 63, 110)
		}

		.black {
			background: rgb(0, 0, 0)
		}

		.yellow {
			background: rgb(240, 215, 112)
		}
		
		/* Composition II */
		#composition2 .row {
			height: 66%;
		}

		#composition2 .row + .row {
			height: 34%;
			border-top: 6px solid #000;
		}

		#composition2 .row > .box:first-child {
			width: 34%;
			border-right: 6px solid #000;
		}

		#composition2 .row:first-child > .box + .box {
			width: 66%;
		}

		#composition2 .row:last-child > .box + .box {
			width: 56%;
		}

		#composition2 .row:last-child > .box:last-child {
			width: 10%;
			border-left: 6px solid #000;
		}
		
		#composition2 .row .box .box {
			width: 100%;
			height: 50%;
		}

		#composition2 .row:first-child > .box .box:first-child,
		#composition2 .row:last-child > .box:last-child .box:first-child {
			border-bottom: 6px solid #000;
		}


		/* Tableau I */
		#tableau1 > .row {
			height: 50%;
		}

		#tableau1 .row + .row {
			border-top: 6px solid #000;
		}

		/* First row first level */
		#tableau1 > .row:first-child > .box:nth-child(1) {
			width: 45%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:first-child > .box:nth-child(2){
			width: 35%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:first-child > .box:nth-child(3) {
			width: 20%;
		}

		/* First row second level */
		#tableau1 > .row:first-child > .box:nth-child(1) > .box:first-child {
			height: 10%;
			border-bottom: 6px solid #000;
		}

		#tableau1 > .row:first-child > .box:nth-child(1) > .box:last-child {
			height: 90%;
		}

		#tableau1 > .row:first-child > .box:nth-child(3) > .box:nth-child(1) {height: 20%;
			border-bottom: 6px solid #000;
		}

		#tableau1 > .row:first-child > .box:nth-child(3) > .box:nth-child(2) {height: 60%;
			border-bottom: 6px solid #000;
		}

		#tableau1 > .row:first-child > .box:nth-child(3) > .box:nth-child(3) {
			height: 20%
		}

		/* Second row first level */
		#tableau1 > .row:last-child > .box:nth-child(1) {
			width: 15%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:last-child > .box:nth-child(2){
			width: 65%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:last-child > .box:nth-child(3) {
			width: 20%;
		}

		/* Second row second level */
		#tableau1 > .row:last-child > .box:nth-child(2) > .row:first-child {
			height: 90%;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:last-child {
			height: 10%;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:first-child > .box:first-child {
			width: 47%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:first-child > .box > .box:first-child {
			height: 60%;
			border-bottom: 6px solid #000;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:first-child > .box > .box:last-child {
			height: 40%;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:last-child > .box:first-child {
			width: 85%;
			border-right: 6px solid #000;
		}

		#tableau1 > .row:last-child > .box:nth-child(2) > .row:last-child > .box:last-child {
			width: 15%;
		}
              
            
!

JS

              
                
              
            
!
999px

Console