cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <!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">
<head>
<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">

<style>
body { 
  -webkit-text-size-adjust:none; 
  -ms-text-size-adjust:none; 
}
input { display:none; }

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



}    

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

  #navcontainer{
    position:relative;
  }

  #navcontainer th{
    display:block;
    width: 100%;
    border-bottom:2px solid #ffffff;
    height:18px;
    padding: 10px 0px;      
  }

  #menucontainer{
    position:relative;
    overflow:hidden;
  }

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

  /* checkbox mechanism */
  #navcheckbox:checked + table{
    margin-top:0%;
  }      

  /* fallback hover mechanism */
  .nav-over,.nav-under{
   display:block !important;
   max-height:none !important;
   padding-top:3px;
   padding-bottom:3px;
  } 

  .nav-over img,.nav-under img{
   display:block;
   float:right;
   margin-right:5px;
  } 

  /* 
  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
  */
  .nav-over{
   -ms-transition-delay: 1.5s;
   -webkit-transition-delay: 1.5s;            
  }

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

  #navcontainer > .nav-over:hover{
    visibility:hidden;
  }
}

</style>
</head>
<body style="margin:0px; padding:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td align="center">
  <table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="main-table">
    <tr>
    <td>
      <table align="left" border="0" cellpadding="10" cellspacing="0"><tr>
        <td>
          <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>
        </td>
      </tr></table>
    </td></tr>
    <tr><td>
      <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>
        </label>
        <!--<![endif]-->
        <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">
            <tr>
            <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>
            </tr>
        </table>
        </div>
      </div><BR>

      <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></tr><tr>
      <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. 
      </td></tr></table>

      </td>
      </tr>
  </table>
  </td>
  </tr>
</table>


</body>
</html>
            
          
!
999px
Loading ..................

Console