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.


                <nav class="navbar navbar-default banner">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      <a class="navbar-brand" href="#">Brand</a>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <form class="navbar-form navbar-right navbar-form-search" role="search">
        <div class="search-form-container hdn" id="search-input-container">
          <div class="search-input-group">
            <button type="button" class="btn btn-default" id="hide-search-input-container"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></button>
            <div class="form-group">
              <input type="text" class="form-control" placeholder="Search for...">
        <button type="submit" class="btn btn-default" id="search-button"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
      <ul class="nav navbar-nav navbar-right navbar-nav-primary">
        <li><a href="#">Home</a></li>
        <li><a href="#">Project</a></li>
        <li><a href="#">Gallery</a></li>
        <li><a href="#">Publication</a></li>
        <li><a href="#">Events</a></li>
        <li><a href="#">News</a></li>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->


                .banner {
  background: #fff;
  font-family: Lato, sans-serif;
.navbar-nav-primary {
  text-transform: uppercase;

.navbar-form-search {
  position: relative;
  .form-control {
    width: 250px;
  .btn {
    border: 0;
    background: transparent;
    font-size: 18px;
    &:focus {
      color: #000;
      outline: none;
      box-shadow: none;
  .search-form-container {
    text-align: right;
    position: absolute;
    width: 300px;
    overflow: hidden;
    background: #fff;
    right: 60px;
    top: 0;
    z-index: 9;
    transition: all .3s ease-in-out;
    &.hdn {
      width: 0;
    .search-input-group {
      width: 300px;


                (function($) {
  $('#search-button').on('click', function(e) {
    if($('#search-input-container').hasClass('hdn')) {
      return false;
  $('#hide-search-input-container').on('click', function(e) {
    return false;