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

              
                <!-- top navigation header START --> 

<nav class="navbar navbar-expand-md bg-dark navbar-dark">

<!-- unused: fixed-top--> 
   
  
  <!-- Brand -->
  <a class="navbar-brand" href="/Default.aspx">
    <img id="logo" alt="Logo" src="https://picsum.photos/id/774/50/50">
    <span>Bootstrap 4 (layout w/content)</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="#blahblah">Click-to-scroll</a> </li>
    </ul>
  </div>
</nav>
<!-- top navigation header END -->



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

<!-- START of content sections --> 
<!-- ========================= -->
 
  
<!-- Jumbotron content section-->  
    <div class="row">
    <div class="col text-center">
      column JUMBOTRON section
    </div>
  </div>
  
<!-- main page content and sidebar box -->
  <div class="row">
    <!-- sidebar navigation section -->
    <!-- auto-hides when small screen -->
    <div class="col sidebar_nav d-none d-md-block text-center">
      column SIDEBAR-NAV (hide this section on medium and smaller screens)
      
      <div class="col sidenavbar">
        <a href="https://getbootstrap.com/docs/3.4/getting-started/">BS3 docs style sidebar-nav</a> (should always stick to top regardless of scrolling down page)
      </div>
      
    </div>
  <!-- main content section -->  
    <div class="col text-center">

<h2>Column MAIN CONTENT</h2>


<h1>Nonummy Platea Nunc Dictum Pretium Per</h1>
<h2>Dictumst Posuere Vestibulum</h2>

<p>Purus ultricies accumsan faucibus Tempor montes nulla nulla augue laoreet, libero porttitor venenatis ac Lorem tortor malesuada. Sollicitudin diam feugiat gravida. Magna curabitur. Fusce vulputate platea imperdiet suscipit, fermentum magnis magnis purus sodales habitasse sodales nunc volutpat, ut natoque. Hendrerit magna nullam interdum porttitor tempor dictum tortor mattis donec potenti arcu morbi pharetra sem leo nullam commodo tellus. Congue leo dictum lectus penatibus feugiat pulvinar, maecenas eu turpis, posuere sagittis sapien, malesuada eleifend praesent pede pulvinar massa mollis sagittis per ullamcorper suscipit luctus. Adipiscing amet.</p>

<p>Quisque leo pharetra porttitor cras pede nibh pretium fermentum ridiculus luctus pretium felis enim sociis volutpat laoreet arcu auctor duis natoque convallis. Egestas venenatis fringilla leo congue, porttitor laoreet tempus Cras porta. Nisi lacus facilisis nisl ullamcorper justo hymenaeos integer libero lobortis class tempor nulla volutpat neque dui mus. Proin nec nostra metus tempus suscipit, sagittis eget. Cras, elementum sagittis vel dis venenatis pretium. Commodo posuere molestie nunc facilisis. Leo. Proin mi morbi est. Montes eget ornare aliquam lacus lacus per habitasse lacinia faucibus laoreet, vehicula eget. Pharetra mauris. Mus taciti non dis sem ultricies dis egestas duis ligula sem vitae potenti. Pellentesque maecenas cum proin hendrerit at et penatibus arcu interdum velit ornare nascetur sociosqu ac gravida ridiculus class velit leo potenti purus ultrices porttitor vulputate potenti nisi sociosqu sollicitudin fames Viverra fames ultrices rhoncus dolor arcu. Curabitur rutrum sapien netus eros. Pulvinar mus est Urna rhoncus.</p>
<h2 id="blahblah">Blah blahhh blabalabala</h2>

<p>Mi mollis morbi nostra euismod sit. Duis nulla cubilia at orci mollis hymenaeos gravida sodales imperdiet suscipit lacus. Luctus mauris aliquet justo. Velit Lobortis curae; auctor ac. Est, mauris velit commodo leo rutrum senectus eget nonummy penatibus iaculis cum maecenas hendrerit in et ipsum. Sociis ut aliquam venenatis. Tempus. Blandit. Montes cum accumsan Ultrices ligula dapibus Sagittis. Tempus lectus pellentesque at nunc donec ipsum sagittis potenti. Ad.</p>

      
    </div>
  </div>
  
  
  <!-- Carousel content section -->  
    <div class="row">
    <div class="col text-center">
      column CAROUSEL section
    </div>
  </div>

  <!-- cards content section -->
  <div class="row">
    <div class="col text-center">
      column CARD 1 OF 3 section
    </div>
    <div class="col text-center text-center">
      column CARD 2 OF 3 section
    </div>
    <div class="col text-center">
      column CARD 3 OF 3 section
    </div>
  </div>

  
  <!-- END of content sections -->  
</div>
  <!-- END of container section -->  



<!-- footer section -->  
<div class="footer_section text-center text-white bg-dark">
  <p>FOOTER section</p>

              
            
!

CSS

              
                /* smooth scrolling with JS code */
html {
  scroll-behavior: smooth;
}


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

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

/* styling of footer section */
.footer_section {
  border-radius: 0.3rem;
  margin: 0.1rem;
  padding: 0.5rem;
}

/* sidebar navigation stays on top while scrolling */
.sidenavbar{
  position:-webkit-;
  position:sticky;
  top:0;
}
              
            
!

JS

              
                $(document).ready(function(){
  // Add smooth scrolling to all links
  $("a").on('click', function(event) {

    // Make sure this.hash has a value before overriding default behavior
    if (this.hash !== "") {
      // Prevent default anchor click behavior
      event.preventDefault();

      // Store hash
      var hash = this.hash;

      // Using jQuery's animate() method to add smooth page scroll
      // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
      $('html, body').animate({
        scrollTop: $(hash).offset().top
      }, 800, function(){

        // Add hash (#) to URL when done scrolling (default click behavior)
        window.location.hash = hash;
      });
    } // End if
  });
});
              
            
!
999px

Console