Pen Settings



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


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.


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.


                <div class="container">
  <button type="button" class="btn btn-success" data-toggle="modal" data-target="#cartModal">
    View Cart

<div class="modal fade" id="cartModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header border-bottom-0">
        <h5 class="modal-title" id="exampleModalLabel">
          Your Shopping Cart
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
      <div class="modal-body">
        <table class="table table-image">
              <th scope="col"></th>
              <th scope="col">Product</th>
              <th scope="col">Price</th>
              <th scope="col">Qty</th>
              <th scope="col">Total</th>
              <th scope="col">Actions</th>
              <td class="w-25">
                <img src="" class="img-fluid img-thumbnail" alt="Sheep">
              <td>Vans Sk8-Hi MTE Shoes</td>
              <td class="qty"><input type="text" class="form-control" id="input1" value="2"></td>
                <a href="#" class="btn btn-danger btn-sm">
                  <i class="fa fa-times"></i>
        <div class="d-flex justify-content-end">
          <h5>Total: <span class="price text-success">89$</span></h5>
      <div class="modal-footer border-top-0 d-flex justify-content-between">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-success">Checkout</button>


                .container {
  padding: 2rem 0rem;

.table-image {
  thead {
    td, th {
      border: 0;
      color: #666;
      font-size: 0.8rem;
  td, th {
    vertical-align: middle;
    text-align: center;
    &.qty {
      max-width: 2rem;

.price {
  margin-left: 1rem;

.modal-footer {
  padding-top: 0rem;


                $(document).ready(function() {