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

Untitled

A Pen By Captain Anonymous

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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Interactive Tabs for Email</title>
<style>
* { 
  font-family: Helvetica, sans-serif; 
  margin:0;
  padding:0;
}
body {
  -webkit-text-size-adjust:100%; 
}
.tab, .tabcheck {
  display: none;
}
.tabcheck {
  height:0px;
  visibility:hidden;
}

.title1,.title2,.title3 {
  background-color:#ffffff;
  float: left;
  padding:15px 20px 15px 20px;
  border: 1px solid #888888;
  border-bottom: 0px;
  cursor: pointer;
  border-radius: 5px 5px 0px 0px;
}

.tabcheck:checked + #container {
  height: 363px !important;
  max-height: 363px !important;
}

.tabcheck:checked + div, 
#tab2:checked + span .content2,
#tab3:checked + span .content3
{
  display:block !important;
  max-height: none !important;
  height: auto !important;
}

#tab1:checked + span .title1,
#tab2:checked + span .title2,
#tab3:checked + span .title3 {
  background-color:#bbbbbb;
}

/*
 GMAIL [lang] fix
*/

.gfix{}

* [lang=x-title1],
* [lang=x-title2],
* [lang=x-title3]{
  background-color:#ffffff;
  float: left;
  padding:15px 20px 15px 20px;
  border: 1px solid #888888;
  border-bottom: 0px;
  cursor: pointer;
  border-radius: 5px 5px 0px 0px;
}

* [lang=x-tabcheck]:checked + [lang=x-container] {
  height: 363px !important;
  max-height: 363px !important;
}

* [lang=x-tabcheck]:checked + div,  
* [lang=x-tab2]:checked + span [lang=x-content2],
* [lang=x-tab3]:checked + span [lang=x-content3]
{
  display:block !important;
  max-height: none !important;
  height: auto !important;
}

* [lang=x-tab1]:checked + span [lang=x-title1],
* [lang=x-tab2]:checked + span [lang=x-title2],
* [lang=x-tab3]:checked + span [lang=x-title3]{
  background-color:#bbbbbb;
}
</style>
</head>
 
<body bgcolor="#ffcc00">
<table width="100%" height="100%">
  <tr>
    <td></td>
    <td bgcolor="#ffcc00">

      <div class="content">
      <table>
        <tr>
          <td><BR>
<form>
<!--[if !mso]><!-- -->
<input type=radio class="tabcheck" lang="x-tabcheck" style="display:none !important;" checked>
<!--<![endif]-->
<div id="container" lang="x-container" style="width:500px;height:310px;max-height:310px;overflow:hidden;">
<!--[if !mso]><!-- -->
<input type=radio class="tabcheck" lang="x-tabcheck" style="display:none !important;" checked>
<div style="height:0px;max-height:0px;overflow:hidden;">
<label><input type=radio name="tab" class="tab" lang="x-tab1"  id="tab1" style="display:none !important;" checked><span><div class="title1" lang="x-title1" >Tab 1</div>

  <!-- NESTED TAB 2 -->
  <label><input type=radio name="tab" class="tab" lang="x-tab2" id="tab2" style="display:none !important;"><span><div class="title2" lang="x-title2">Tab 2</div>

    <!-- NESTED TAB 3 -->
    <label><input type=radio name="tab" class="tab" lang="x-tab3" id="tab3" style="display:none !important;"><span><div class="title3" lang="x-title3">Tab 3</div>
    <div class="content3" lang="x-content3" style="height:0px;max-height:0px;overflow:hidden;clear:left;">
    <table cellpadding="0" cellspacing="0">
      <tr>
      <td colspan="2" height="150" width="500" bgcolor="#bbbbbb" valign=center align=center style="font-size:50px;color:#555555;"><b>Tab 3</b></td>
      </tr><tr>
      <td width="250" height="170" valign="top" style="background: #777777; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
          <H2>Title 3A</H2>
          <p>The quick, brown fox jumps over a lazy dog. <BR><BR>
          <a href="#" style="color: #BDD4FC;">View Deal</a>
          </p>
          </div></td>
      <td width="250" height="170" valign="top" style="background: #555555; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
          <h2>Title 3B</h2>
          <p>The quick, brown fox jumps over a lazy dog. <BR><BR>

          <a href="#" style="color: #BDD4FC;">View Deal</a>
          </p>
          </div></td>
      </tr>
    </table>
    </div></span>
    </label>
    <!-- END NESTED TAB 3 -->

  <div class="content2" lang="x-content2" style="height:0px;max-height:0px;overflow:hidden;clear:left;">
  <table cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="2" height="150" width="500" bgcolor="#bbbbbb" valign=center align=center style="font-size:50px;color:#555555;"><b>Tab 2</b></td>
    </tr>
    <tr>
    <td width="250" height="170" valign="top" style="background: #777777; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
      <H2>Title 2A</H2>
      <p>The quick, brown fox jumps over a lazy dog. <BR><BR>
      <a href="#" style="color: #BDD4FC;">View Deal</a>
      </p>
      </div></td>
      <td width="250" height="170" valign="top" style="background: #555555; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
      <h2>Title 2B</h2>
      <p>The quick, brown fox jumps over a lazy dog. <BR><BR>

      <a href="#" style="color: #BDD4FC;">View Deal</a>
      </p>
      </div></td>
    </tr>
  </table>
  </div>
  </span>
  </label>
  <!-- END NESTED TAB 2 -->

  <!-- TAB 1 Content originally here -->

</span></label>
</div>
<!--<![endif]-->

<!-- TAB 1 Content moved outside nested labels for fallback for non supported clients: Outlook.com/Outlook -->
<table cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="2" height="150" width="500" bgcolor="#bbbbbb" valign=center align=center style="font-size:50px;color:#555555;"><b>Tab 1</b></td>
    </tr>
    <tr>
    <td width="250" height="170" valign="top" style="background: #777777; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
        <H2>Title 1A</H2>
        <p>The quick, brown fox jumps over a lazy dog. <BR><BR>
        <a href="#" style="color: #BDD4FC;">View Deal</a>
        </p>
    </div></td>
    <td width="250" height="170" valign="top" style="background: #555555; font-family: Helvetica; font-size: 14px; line-height: 100%; color: #ffffff;"><div style="padding:20px;">
        <h2>Title 1B</h2>
        <p>The quick, brown fox jumps over a lazy dog.<BR><BR>

        <a href="#" style="color: #BDD4FC;">View Deal</a>
        </p>
        </div></td>
    </tr>
</table>
</div>
</form>

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


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

Console