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

              
                <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css">
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> -->
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> -->
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.0/css/bootstrap.min.css"> -->
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> -->

<div class="container">
  Default container
</div>

<div class="d-flex">
  <div class="container">
    Container in flex parent
  </div>
</div>

<nav class="navbar navbar-expand-md navbar-dark bg-dark text-white my-3">
  <button class="navbar-toggler mr-auto mb-2 bg-light" data-toggle="collapse" data-target="#myNavbar">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="myNavbar">
    <div class="container-fluid border border-success">
      <div class="row flex-fill border border-danger">
        <div class="col-lg-3 bg-info">
          123
        </div>
        <div class="col-lg-9 bg-warning">
          456
        </div>
      </div>
    </div>
  </div>
</nav>

<div class="row border border-danger">
  <div class="col-lg-3 bg-info">
    123
  </div>
  <div class="col-lg-9 bg-warning">
    456
  </div>
</div>

<div style="height: 300px;">
	<div class="container h-100 d-flex flex-column">
		<div class="row justify-content-between">
			<div class="col-sm-9">
				<h3>Example heading</h3>
			</div>
		</div>
		<div class="row flex-grow-1">
			Content area
		</div>
	</div>
</div>

<div class="container">
  <div class="row">
    <div class="col">
      <pre>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae porro alias ad sequi dolores temporibus officiis, soluta fugiat numquam distinctio doloremque omnis maiores ex autem? A ipsum id sed laborum!
      </pre>
    </div>
    <div class="col">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere itaque dolore rem culpa a eos molestiae nostrum. Odit ratione quaerat laudantium numquam atque aliquam quae, provident repudiandae, asperiores soluta dignissimos.
    </div>
  </div>
</div>

<div class="container">
  <div class="row">
    <div class="col">
      <pre>
        Lorem ipsum dolor sit amet consectetur adipisicing elit.
      </pre>
    </div>
    <div class="col">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere itaque dolore rem culpa a eos molestiae nostrum. Odit ratione quaerat laudantium numquam atque aliquam quae, provident repudiandae, asperiores soluta dignissimos.
    </div>
  </div>
</div>


<div class="container">
  <div class="row">
    <div class="col min-w-0">
      <pre>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae porro alias ad sequi dolores temporibus officiis, soluta fugiat numquam distinctio doloremque omnis maiores ex autem? A ipsum id sed laborum!
      </pre>
    </div>
    <div class="col min-w-0">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere itaque dolore rem culpa a eos molestiae nostrum. Odit ratione quaerat laudantium numquam atque aliquam quae, provident repudiandae, asperiores soluta dignissimos.
    </div>
  </div>
</div>

<div class="d-flex flex-wrap my-3">
  <div class="row flex-fill mx-0">
    <div class="col-12">First row</div>
  </div>
  <div class="row flex-fill mx-0">
    <div class="col-12">Second row</div>
  </div>
</div>

              
            
!

CSS

              
                .container {
  margin-top: 1rem;
  background-color: rgba(255,0,0,.15);
  border: 1px solid rgba(255,0,0,.25);
}

.row {
  flex: unset !important;
  background-color: rgba(0,0,255,.15);
  border: 1px solid rgba(0,0,255,.25);
}

[class^="col"] {
  background-color: rgba(0,0,255,.15);
  border: 1px solid rgba(0,0,255,.25);
}

.min-w-0 { min-width: 0; }

              
            
!

JS

              
                
              
            
!
999px

Console