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


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


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.


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.


                <div id="container">
	<div class="cell">cell 1 ; fixed width 100px</div>
	<div class="cell">cell 2 ; min-width 200px ; otherwise same width as the cell 3+</div>
	<div class="cell">cell 3</div>
	<div class="cell">cell …</div>
	<div class="cell">cell n</div>

<p>Notes for me:</p>
	<li><code>grid-template-columns</code> defines my explicite grid-template. Here, I specifically set the "cell 1" to 100px and the second to “min 200px”.</li>
	<li>What about the other cells? They are NOT explicitely sized. That is where the <code>grid-auto-columns</code> come in: this property describes what will happen to the collumns that are not explicitely sized. In my case, this property only applies to the cell 3 and beyond. The first two are ruled by <code>grid-template-columns</code></li>
	<li>I force the implicite AND explicite cells to be collumns (and to not flow on another row by using <code>grid-auto-flow</code>.</li>
<p>In my case, the first cell will always be 100px wide. The second will be at-least 200px wide. The other cells share the remaining space. Also, when the othercells (cells 3+) will exceed 200px, the will share the extra-space with the second cell.</p>
<p>This Way:</p>

	<li>On small screens, I have [ 70px | 200 px | &lt;a bunch of remaining cells the space left&gt; ]</li>
	<li>On big screens, I’ll have [ 70px | &lt;a bunch+1 of remaining cells sharing the space left&gt; ]


                #container, .cell {
	border: 1px dashed grey;
	box-sizing: border-box;
	padding: 5px;
#container {
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: 120px minmax(200px, 1fr);
	grid-auto-columns: 1fr;