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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Collapsible Nav using Checkbox</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

body { 
input { display:none; }

@media (max-width:480px) {
    #logo {height:28px !important;
    .main-table, .main-content img { width:100% !important;}


@media (max-width:480px) and (-webkit-min-device-pixel-ratio: 0){


  #navcontainer th{
    width: 100%;
    border-bottom:2px solid #ffffff;
    padding: 10px 0px;      


  #navcontainer table{
    -ms-transition: margin-top .5s ease-in-out;
    -webkit-transition: margin-top .5s ease-in-out;      

  /* checkbox mechanism */
  #navcheckbox:checked + table{

  /* fallback hover mechanism */
   display:block !important;
   max-height:none !important;

  .nav-over img,.nav-under img{

  Transision delay helps windows 8 to fire
  and helps Outlook iOS to not "bounce around"
  But causes Android to skip first time
  webkit transition is required to enable links in menu in Outlook iOS
   -ms-transition-delay: 1.5s;
   -webkit-transition-delay: 1.5s;            

  #navcontainer > .nav-over:hover + div table{
    margin-top:0% !important;

  #navcontainer > .nav-over:hover{

<body style="margin:0px; padding:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <td align="center">
  <table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="main-table">
      <table align="left" border="0" cellpadding="10" cellspacing="0"><tr>
          <a href="http://www.freshinbox.com/"><img id="logo" border="0" height="35" src="http://freshinbox.com/examples/hamburger-menu/images/fi-logo-large.jpg"></a>
      <div id="navcontainer">
        <!--[if !mso 9]><!-->
        <label for="navcheckbox">
        <div class="nav-under" style="display:none;overflow:hidden;max-height:0px;background-color:#3b5369;"><img src="http://freshinbox.com/examples/hamburger-menu/images/hamburger.png" width="30" height="30" alt="Show Menu" border="0"></div>
        <div class="nav-over" style="display:none;overflow:hidden;max-height:0px;position:absolute;top:0px;width:100%;opacity:0
        "><img src="http://freshinbox.com/examples/hamburger-menu/images/hamburger.png" width="30" height="30" alt="Show Menu" border="0"></div>
        <div id="menucontainer">
        <!--[if !mso 9]><!--><input id="navcheckbox" type="checkbox" style="display:none !important;"><!--<![endif]-->
        <table cellspacing="0" cellpadding="0" border="0" width="100%" bgcolor="#3b5369" style="width:100% !important">
            <th height="25" align="center" valign="center"><a href="http://freshinbox.com/blog" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Blog</a></th>
            <th height="25" align="center"><a href="http://freshinbox.com/blog/category/interactive-email-tutorial/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Interactive Email</a></th>
            <th height="25" align="center"><a href="http://freshinbox.com/resources/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Resources</a></th>            
            <th height="25" align="center"><a href="http://freshinbox.com/blog/about/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">About</a></th>

      <table cellspacing="0" cellpadding="0" border="0" width="100%" class="main-content"><tr><td>
      <img src="http://freshinbox.com/examples/hamburger-menu/images/hero.png" width="600">
      <td style="font-size:18px;font-family:arial,sans-serif;color:#555555;padding:20px;"><BR>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet tortor elit. Donec faucibus mattis nulla eu viverra. Integer ac mattis massa. Vivamus sollicitudin urna vitae bibendum interdum. Vivamus eget lobortis neque. Suspendisse fringilla ante vitae est aliquet, at ornare nunc posuere. Duis venenatis ligula et nunc accumsan, vitae egestas leo pulvinar. 


🕑 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.