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

              
                <div class="w3-content w3-margin-16">
  <div class="w3-row">
    <div class="w3-card-2 w3-light-grey w3-col l9 m9">
      <h1>Logo</h1>
    </div>

    <nav class="w3-sidenav w3-white w3-card-2" style="display:none">
      <a href="javascript:void(0)" onclick="w3_close()" class="w3-closenav w3-large">Close &times;</a>
      <a href="#">Link 1</a>
      <a href="#">Link 2</a>
      <a href="#">Link 3</a>
      <a href="#">Link 4</a>
      <a href="#">Link 5</a>
    </nav>

    <div class="w3-quarter w3-opennav w3-xlarge w3-padding-16 w3-center" onclick="w3_open()">Search</div>

  </div>

  <ul class="w3-navbar w3-large w3-black w3-center">
  <li class="w3-hide-large w3-hide-medium w3-black w3-opennav w3-right">
    <a href="javascript:void(0);" onclick="myFunction()">☰ meny</a>
  </li>
  <li class="w3-hide-small"><a href="#">Link 1</a></li>
  <li class="w3-hide-small"><a href="#">Link 2</a></li>
  <li class="w3-hide-small"><a href="#">Link 3</a></li>
</ul>

<div id="topnav" class="w3-hide w3-hide-large">
  <ul class="w3-navbar w3-left-align w3-large w3-black">
    <li><a href="#">Link 1</a></li>
    <li><a href="#">Link 2</a></li>
    <li><a href="#">Link 3</a></li>
  </ul>
</div>  
  <div class="w3-card-2 w3-grey jrl-min-50">
    <h2>Heading</h2>
  </div>
  <div class="w3-row">
    <div class="w3-third">
      <div class="w3-card-2 w3-grey jrl-space jrl-min-200">
        <h3>Content</h3></div>
    </div>
    <div class="w3-third">
      <div class="w3-card-2 w3-grey jrl-space jrl-min-200">
        <h3>Content</h3></div>
    </div>
    <div class="w3-third">
      <div class="w3-card-2 w3-grey jrl-space-last jrl-min-200">
        <h3>Content</h3></div>
    </div>
  </div>
  <div class="w3-card-2 w3-grey jrl-min-250">
    <h2>Content</h2></div>

  <div class="w3-card-2 w3-grey jrl-min-250">
    <h2>Content</h2></div>

  <footer class="w3-card-2 w3-light-grey jrl-min-350">
    <h2>Footer</h2></footer>
</div>
              
            
!

CSS

              
                @media only screen and (min-width: 600px) {
  .jrl-space {
    margin: 0 8px 0 0;
    padding: 8px;
  }
  .jrl-space-last {
    margin: 0 0 8px 0;
    padding: 8px;
  }
}

.jrl-min-50 {
    min-height: 50px;
}

.jrl-min-100 {
    min-height: 100px;
}

.jrl-min-150 {
    min-height: 150px;
}

.jrl-min-200 {
    min-height: 200px;
}

.jrl-min-250 {
    min-height: 250px;
}

.jrl-min-300 {
    min-height: 300px;
}

.jrl-min-350 {
    min-height: 350px;
}
              
            
!

JS

              
                function myFunction() {
    document.getElementById("topnav").classList.toggle("w3-show");
}
              
            
!
999px

Console