cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <div class="admin">
  <div class="admin-sidebar bg-faded">
    <div class="navbar navbar-light">
      <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#sidebar-navigation" aria-controls="sidebar-navigation" aria-expanded="false" aria-label="Toggle navigation">

      </button>
      <div class="collapse navbar-toggleable-md py-2" role="navigation" id="sidebar-navigation">
        <h5>Sidebar</h5>
        <p>Here you can just create a simple admin menu.</p>
        <hr>
        <ul class="nav navbar-nav">
          <li class="">
            <a href="#easy" class="nav-link">
              Easy admin boilerplate
            </a>
          </li>
          <li class="active">
            <a href="#code" class="nav-link">
              Css and html
            </a>
          </li>
          <li class="">
            <a href="#done" class="nav-link">
              Done
            </a>
          </li>
          <li class="">
            <a href="#isee" class="nav-link">
              I see what you did there
            </a>
          </li>
          <li class="">
            <a href="#supports" class="nav-link">
              Supports
            </a>
          </li>
        </ul>
        <hr>
        <h5>And just some text to fill</h5>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci assumenda at consequatur corporis distinctio ducimus, explicabo iure laboriosam maiores minus modi non numquam odit placeat praesentium quod recusandae sit totam!
        </p>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci assumenda at consequatur corporis distinctio ducimus, explicabo iure laboriosam maiores minus modi non numquam odit placeat praesentium quod recusandae sit totam!
        </p>
      </div>
    </div>
  </div>
  <div class="admin-body" role="main">
    <div class="container py-2 px-2">
      <h1 id="easy">Easy admin boilerplate!</h1>
      <p>
        The target of this template is to create <strong>two columns</strong> on a page. One is the sidebar and one is the body. The css will extend from <a href="https://getbootstrap.com/">bootstrap (v4)</a>.
      </p>
      <p>
        The sidebar and body have to <strong>scroll independently</strong>.
      </p>
      <p>
        On <strong>mobile phones</strong> and <strong>tablets</strong> in portrait mode (992px or smaller in width) the menu needs to revert to a <strong>hamburger menu</strong>.
      </p>
      <h2 id="code">Css and html!</h2>
      <p>
        Check the panels for the html and css.
      </p>
      <h2 id="done">Done!</h2>
      <p>
        And done. Now just add your own flavor.
      </p>
      <h2 id="isee">I see what you did there!</h2>
      <blockquote>
        Wait what! You told me about mobile phones and stuff, and you just added some styles for large screens.
      </blockquote>
      <p>
        Yeah, bootstrap has an awesome setup for mobile togglable content. So i just added a <a href="https://v4-alpha.getbootstrap.com/components/navbar/#collapsible-content">collapsible navbar</a> from the documentation. I did remove the <strong>nav-item</strong>        class for the list items in it so they don't float.
      </p>
      <h2 id="supports">Supports!</h2>
      <p>
        This is supported by all major browsers. And in case of explorer, <strong>IE10+</strong>
      </p>
      <hr>
      <footer>
        <a href="https://disjfa.github.io/bootstrap-tricks/">bootstrap tricks</a> -
        <a href="https://disjfa.github.io/">disjfa.github.io</a>
      </footer>
    </div>
  </div>
</div>
            
          
!
            
                @media screen and (min-width: 992px) {
  .admin {
    height: 100vh;
    display: flex;
  }
  .admin .admin-sidebar {
    width: 300px;
    overflow: auto;
  }
  .admin .admin-body {
    flex: 1;
    overflow: auto;
  }
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console