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 id="showdiv1"></div>
<div id="showdiv2"></div>
<div id="showdiv3"></div>
<div id="showdiv4"></div>

<div class="padding">
<table>
  <tbody><tr>
    <td>
      <a href="#showdiv1" class="clicker" tabindex="1" rel="nofollow">tab 1</a>
    </td>
    <td>
      <a href="#showdiv2" class="clicker" tabindex="2" rel="nofollow">tab 2</a>
    </td>
    <td>
      <a href="#showdiv3" class="clicker" tabindex="3" rel="nofollow">tab 3</a>
    </td>
    <td>
      <a href="#showdiv4" class="clicker" tabindex="4" rel="nofollow">tab 4</a>
    </td>
  </tr>
</tbody></table>

 
  <div class="hiddendiv nr1">
    <p>this menu was made with only CSS!</p>
  </div>
  <div class="hiddendiv nr2">
    <p>No Javascript!</p>
  </div>
  <div class="hiddendiv nr3">
    <p>you can add things other than text of course, like this image:<br><img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fcms.qz.com%2Fwp-content%2Fuploads%2F2018%2F11%2FAP_101209030838-e1542640376786.jpg%3Fquality%3D75%26strip%3Dall%26w%3D410%26h%3D231&f=1&nofb=1"></img><br>look at this wombat! so cute!</p>
    
  </div>
  <div class="hiddendiv nr4">
    <p>feel free to add this to your site ❤️</p>
  </div>
</div>
              
            
!

CSS

              
                body {
  font-family: 'Times New Roman', Times, serif;
  color: black;
  background: white;
  max-width: 800px;
  margin: 0 auto; /* this centers the contents on the page */
}



li.horizontal{
font-size: 5px;
  list-style-type: none;
  display: inline-block;
}

.line-separator{
  height:1px;
  background:#717171;
  border-bottom:1px solid #313030;
}

.center{
  display: block;
  margin: 0 auto;
}

pre.center{
  width: 368px;
}

/* This makes tables look old-timey: */
table {
    margin: 0 auto; /* this centers the nav bar, which is a table */
    border-top: 1px solid #c0c0c0;
    border-left: 1px solid #c0c0c0;
    border-bottom: 1px solid #808080;
    border-right: 1px solid #808080;
}
th, td {
    padding: 5px;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-bottom: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
    background: rgba(255, 255, 255, 0.5); /* semi-transparent white */
}

/* Here's your special divider style, if you chose one: */
hr {
  
  margin: 0 auto; /* center the horizontal rule */
}

/*
 * anything under here is for the menu
 */

.clicker {
  display: inline-block;
  background-color: white;
  color:#000000;
}

.clicker:hover{
color: red;
}

.clicker.hidden {
  display: none;
}
.hiddendiv {
  display: none;
  background-color: none;
}
.hiddendiv.nr2 {
  background-color: none;
}

.hiddendiv.nr3 {
  background-color: none;
}

.hiddendiv.nr4 {
  background-color: none;
}

#showdiv1:target ~ div .hiddendiv.nr1,
#showdiv2:target ~ div .hiddendiv.nr2,
#showdiv3:target ~ div .hiddendiv.nr3,
#showdiv4:target ~ div .hiddendiv.nr4 {
  display: block;
}
              
            
!

JS

              
                
              
            
!
999px

Console