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

              
                <html>
  <head>    
    <link href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>


<nav class="tree-nav">

  <a class="tree-nav__item-title">
    <i class="icon ion-scissors"></i>
    THE INHERITANCE
  </a>
  <a class="tree-nav__item-title">
    <i class="icon ion-android-star"></i>
    The Willful Princess and the Piebald Prince
  </a>

  <details class="tree-nav__item is-expandable">
    <summary class="tree-nav__item-title">The Realm of the Elderlings</summary>
    <details class="tree-nav__item is-expandable">
    
      <summary class="tree-nav__item-title">The Six Duchies</summary>
      <details class="tree-nav__item is-expandable">
        <summary class="tree-nav__item-title">The Farseer Trilogy</summary>
        <div class="tree-nav__item">
<table style="width:100%">
  <tr>
    <th>IP Address</th>
    <th>Object Name</th> 
    <th>Domain Name</th>
    <th>Object Class</th>
    <th>Status</th>
    <th>Mac Address</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
  <tr>
    <td>John</td>
    <td>Doe</td>
    <td>80</td>
  </tr>
</table>
        </div>
      </details>
      
      <details class="tree-nav__item is-expandable">
        <summary class="tree-nav__item-title">The Tawny Man Trilogy</summary>
        <div class="tree-nav__item">
          <a class="tree-nav__item-title"><i class="icon ion-cube"></i> FOOL'S ERRAND</a>
          <a class="tree-nav__item-title"><i class="icon ion-ios-book"></i> GOLDEN FOOL</a>
          <a class="tree-nav__item-title"><i class="icon ion-ios-bookmarks"></i> FOOL'S FATE</a>
        </div>
      </details>
      
      <details class="tree-nav__item is-expandable">
        <summary class="tree-nav__item-title">The Fitz and the Fool Trilogy</summary>
        <div class="tree-nav__item">
          <a class="tree-nav__item-title"><i class="icon ion-ios-bookmarks"></i> FOOL'S ASSASSIN</a>
          <a class="tree-nav__item-title"><i class="icon ion-ios-book"></i> FOOL'S QUEST</a>
          <a class="tree-nav__item-title"><i class="icon ion-android-bookmark"></i> Assassin's Fate</a>
        </div>
      </details>
      
      
    </details>
  </details>

  <details class="tree-nav__item is-expandable">
    <summary class="tree-nav__item-title">The Soldier Son trilogy</summary>
    <div class="tree-nav__item">
      <a class="tree-nav__item-title"><i class="icon ion-edit"></i> SHAMAN'S CROSSING</a>
      <a class="tree-nav__item-title"><i class="icon ion-paperclip"></i> FOREST MAGE</a>
    </div>
  </details>

</nav>

</body>
</html>
              
            
!

CSS

              
                /*
 Only custom marker for summary/details
 For cross browser compatible styling hide Firefox's marker by setting summary { display: block }
 and Chrome and Safari's marker by setting ::-webkit-details-marker {display: none;}
*/
summary {
  display: block;
  cursor: pointer;
  outline: 0; 
}

summary::-webkit-details-marker {
    display: none;
  }

body {
  background-color: #191c1e;
  color: white;  
  font-size: 1.6rem;
  font-family: arial;
  margin: 0;
  padding: 3rem;
}


.tree-nav__item {
  display: block;
  white-space: nowrap;
  color: #ccc;
  position: relative;
}
.tree-nav__item.is-expandable::before {
  border-left: 1px solid #333;
  content: "";
  height: 100%;
  left: 0.8rem;
  position: absolute;
  top: 2.4rem;
  height: calc(100% - 2.4rem);
}
.tree-nav__item .tree-nav__item {
  margin-left: 2.4rem;
}
.tree-nav__item.is-expandable[open] > .tree-nav__item-title::before {
  font-family: "ionicons";
  transform: rotate(90deg);
}
.tree-nav__item.is-expandable > .tree-nav__item-title {
  padding-left: 2.4rem;
}
.tree-nav__item.is-expandable > .tree-nav__item-title::before {
  position: absolute;
  will-change: transform;
  transition: transform 300ms ease;
  font-family: "ionicons";
  color: #fff;
  font-size: 1.1rem;
  content: "\f125";
  left: 0;
  display: inline-block;
  width: 1.6rem;
  text-align: center;
}

.tree-nav__item-title {
  cursor: pointer;
  display: block;
  outline: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 3.2rem;
}
.tree-nav__item-title .icon {
  display: inline;
  padding-left: 1.6rem;
  margin-right: 0.8rem;
  color: #666;
  font-size: 1.4rem;
  position: relative;
}
.tree-nav__item-title .icon::before {
  top: 0;
  position: absolute;
  left: 0;
  display: inline-block;
  width: 1.6rem;
  text-align: center;
}

.tree-nav__item-title::-webkit-details-marker {
  display: none;
}
              
            
!

JS

              
                
              
            
!
999px

Console