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.

              <h3>Scroll horizontally &#x20D7; over the article</h3>
<div class="wrapper">

		<div class="title">AVOCADO</div>
		<p>The avocado (Persea americana) is a tree, long thought to have originated in South Central Mexico, classified as a member of the flowering plant family Lauraceae. The fruit of the plant, also called an avocado (or avocado pear or alligator pear), is
			botanically a large berry containing a single large seed known as a "pit" or a "stone".</p>
		<img class="image" src="avocado.png">
		<div class="title tomato">TOMATO</div>
		<p>The tomato is the edible, often red, berry of the nightshade Solanum lycopersicum, commonly known as a tomato plant. The species originated in western South America.The Nahuatl (Aztec language) word tomatl gave rise to the Spanish word tomate, from
			which the English word tomato derived.</p>
		<img class="image" src="tomato.png">
	<span class="emptyBlocks">
			<div class="title">EMPTY</div>
              @import url('|Crimson+Text');
article  {
	background-image: linear-gradient(to right, transparent 50px, #fdef67 50px, #fdef67 calc(100% - 50px), transparent 0);
.title,.image  {
	position: sticky;
	position: -webkit-sticky;
	z-index: -1;
	width: 50px;
.title  {
	left: 20px;
	height: 100%;
	margin-right: 52px;
	/* -x- right margin = .image's width (50px), to stay hidden when scrolled + 2px (for Chrome)*/
	background-color: dodgerblue;
	font: 28.5pt 'Titan One';
	text-indent: 4px;
	text-shadow: 2px 2px 0 #fdef67;
	color: #f83d23;
	writing-mode: vertical-lr;
	text-orientation: upright;
	-webkit-text-orientation: upright;
.image  {
	left: 150px;
	height: auto;
	margin-bottom: 5px;
	filter: drop-shadow(2px 2px dodgerblue);
p  {
	width: calc(100% - 120px);
	/* -x- width = 100%[article width] - ( 100px[total width of .title and .image] +  20px[for aesthetics]) */
	margin: 20px -50px auto -50px;
	vertical-align: top;
	white-space: initial;
.wrapper  {
	width: 90vw; max-width: 420px;
	height: 400px;
	margin: auto;
	overflow-x: scroll;
	white-space: nowrap;
.wrapper *  {display: inline-block;}
.emptyBlocks, article  {
	width: 80%;
	height: 78%;
	margin: 10% 10% 10% calc(10% + 25px);
	/* -x- extra 25px on left (half of the width of .image) to be visually centred */
.emptyBlocks {background-color: #ccc;}
body  {font-family: 'crimson text';}
h3  {text-align: center;}
@media (max-width: 420px)  { p  {font-size: 11pt;}}
@media (max-width: 375px)  { p  {font-size: 9pt;}}
@supports not ((-webkit-text-orientation: upright) or (text-orientation: upright))  {
	.title  {letter-spacing: 5px;}
🕑 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.