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.


    <input id="nav-state" type="checkbox">
    <label id="nav-label" for="nav-state"></label>
      <li><a href="#">Work</a></li>
      <li><a href="#">Services</a></li>
      <li><a href="#">Company</a></li>
      <li><a href="#">Blog</a></li>
      <li><a href="#">Careers</a></li>
      <li><a href="#">Contact</a></li>
If you open this page in a standalone browser and resize the screen you'll notice a few things. 
   <ul> <li>First, you'll see that the menu above will resize it's font to be screen appropriate using a media querry. </li>
   <li> The "more" menu should appear on smaller screens and allow you to expand the menu vertically. This works well for small screens and gives much better information scent. </li>
   <li>On small screens the top menu should also scroll horizontally. This partially works, but would need some fixes to work well across mobile browers. </li>
   <li>Future adoptation would include support for sub-menu items that would be drop-down when using a mouse and drill-down when on small devices that don't support hover. 



                body,html {
nav {
  width: 100%;
  background-color: #1a1a1a;
#nav-label {color:#fff;background-color:red;display:block;position:relative;}
nav ul {
  position: relative;
  margin: 0;
  padding: 0 12px 0 0;
  list-style: none;
  white-space: nowrap;
  overflow: hidden;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;


nav li {
  display: inline-block;

nav a {
  display: block;
  padding: 10px;
  color: #fff;
  text-decoration: none;

#nav-state {
  display: none;

@media (max-width: 400px) {

  nav li {
#nav-state:checked ~ ul > li {
  display: block;

#nav-state:checked ~ label::before {
  content: 'Less';

nav label {
  float: right;
  color: #fff;
  padding: 10px 10px 10px 25px;
  cursor: pointer;
label::before {
  content: 'More...';