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


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 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.


                <div class="container">
  <p class="viewport">Viewport width: <span class="c-viewport__width" id="vpWidth"></span>px
  <div class="">
    <div class="element main">
      <p>Gingerbread soufflé brownie pie marzipan. Gummies pie pudding icing chocolate cake apple pie chocolate bar. Sweet marzipan powder lollipop gummi bears chupa chups jelly beans marshmallow. Tootsie roll chocolate cake marshmallow. Sesame snaps pastry cotton candy tart applicake. Candy lemon drops cheesecake jelly cake jelly beans oat cake biscuit.</p>
      <p>Apple pie cupcake wafer pie ice cream sugar plum caramels tart brownie. Chocolate cake cotton candy tiramisu lollipop. Carrot cake biscuit wafer jelly soufflé sesame snaps gummi bears.</p> 

    <div class="element sidebar">
      <p>Pudding bear claw chocolate cake gingerbread candy bear claw jelly wafer applicake. Candy jelly beans lollipop tootsie roll applicake lemon drops. Croissant croissant cupcake chupa chups sweet applicake cheesecake biscuit cotton candy.</p>


                html {
  box-sizing: border-box;

*::after {
  box-sizing: inherit;

body {
	background: #f1f1f1;
  font-size: 1.1em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;

.container {
  margin: 2em auto;
  max-width: 45em;
  border: 1px solid #aaa;
  padding: 1em;

.container::after {
  display: block;
  clear: both;
  content: '';

.element {
  padding: 1em;
  background-color: white;

.viewport {
  position: absolute;
  font-size: 75%;
  padding: 5px;
  color: grey;
  background: white;
  top: 0;
  left: calc(50% - 70px);
  border-radius: 11px;
  box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.25);

@media (min-width: 35em) {
  .main {
    width: 67%;
    float: left;

  .sidebar {
    width: 33%;
    float: right;


                var getViewportWidth = function() {
  var windowWidth = window.innerWidth;
  var widthValue = document.getElementById('vpWidth');
  widthValue.innerHTML = windowWidth;
window.addEventListener("resize", getViewportWidth);