Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <!-- top navigation header -->
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
  <!-- Brand -->
  <a class="navbar-brand" href="/Default.aspx">
    <img id="logo" alt="Logo" src="https://picsum.photos/id/774/50/50">
    <span>Bootstrap 4 (nested layout)</span>
  </a>

  <!-- Toggler/collapsible Button -->
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
    <span class="navbar-toggler-icon"></span>
  </button>

  <!-- Navbar links -->
  <div class="collapse navbar-collapse justify-content-end" id="collapsibleNavbar">
    <ul class="navbar-nav">
      <li class="nav-item"> <a class="nav-link" href="#">Home</a> </li>
      <!-- Dropdown -->
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
          About Us
        </a>
        <div class="dropdown-menu dropdown-menu-right">
          <a class="dropdown-item" href="#">Meetings meetings meetings</a>
          <a class="dropdown-item" href="#">Subscriptions</a>
          <a class="dropdown-item" href="#">History</a>
        </div>
      </li>
      <li class="nav-item"> <a class="nav-link" href="#">Contact</a> </li>
    </ul>
  </div>
</nav>

<!-- START of container -->
<div class="container">

  <!-- START of content sections -->
  <!-- ========================= -->

  <!-- == Jumbotron content section == -->
 <!-- <div class="row">
    <div class="col d-none d-md-block bg-primary">JUMBOTRON section</div>
  </div> -->


  <!-- sidebar -->
  <div class="row">
    <div class="col-sm-3 sidebar_nav d-none d-sm-block d-print-none bg-danger">
      Sidebar navigation (auto-hide on small screen)
    </div>

    
    <div class="col">
      <!-- nested columns -->
      <div class="row">
        <div class="col-md-2 bg-warning">1</div>
        <div class="col-md-4 bg-warning">2</div>
        <div class="col-md-6 bg-warning">3</div>
      </div>
      <div class="row">
        <div class="col-md-7 bg-info">B1</div>
        <div class="col-md-5 bg-info">B2</div>
      </div>

      <div class="row">
        <div class="col-12 bg-secondary">C</div>
      </div>

      <!-- testing different breakpoints -->
      <div class="row">
        <div class="col-sm-2 bg-success">D1</div>
        <div class="col-sm-1 bg-success">D2</div>
        <div class="col-md-3 bg-success">D3</div>
        <div class="col-md-4 bg-success">D4</div>
        <div class="col-sm-1 bg-success">D5</div>
        <div class="col-lg-1 bg-success">D6</div>
      </div>

    </div>
  </div>

  <!-- == Jumbotron content section == -->
  <!--  <div class="row">
    <div class="col bg-primary">JUMBOTRON section</div>
  </div> 
-->

  <!-- END of container -->
</div>

<!-- footer section -->
<footer class=" py-4 bg-dark text-white-50">
  <div class="container text-center">
    <small>Copyright &copy; Your Website</small>
  </div>
</footer>
              
            
!

CSS

              
                /* .container {
  display: flex; /* or inline-flex */
/* } */

/* styling of content boxes */
.col {
/*  background-color: lavender; */
  border-radius: 0.3rem;
/*  margin: 0.1rem;
  padding: 1rem; */
}  

/* size-defined content boxes */
[class*='col-'] {
/*  background-color: lavender; */
  border-radius: 0.3rem;
/*  margin: 0.1rem;
  padding: 1rem; */
}


/* styling of sidebar-navigation section */
.sidebar_nav {
/*  background-color: pink; */
  border-radius: 0.3rem;
/*  margin: 0.1rem;
  padding: 1rem; */

  /* keep sidebar-nav 'sticky' */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}


              
            
!

JS

              
                
              
            
!
999px

Console