Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

Template

Make Template?

Templates are Pens that can be used to start other Pens. You can view all of your templates, or learn more in the documentation.

Screenshot

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

Uploading

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

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.

HTML

            
              <table class="deviceWidth" width="600" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td class="outerMargin" width="10" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td class="contentBoxOuter" width="580" bgcolor="#FFFFFF">
    

    <table class="fullWidth" width="580" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25" class="contentInnerMargin" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
        <td width="530" align="center" class="contentBoxInner" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;padding: 10px 0 10px 0;">
        

  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="100%">
        
        <!-- 4 COLUMN DESKTOP/2 COLUMN STACKED MOBILE -->
        <table width="262" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
          <tr>
            <td width="131" align="center" bgcolor="#E8E8E8" class="halfWidth" style="mso-line-height-rule:exactly;line-height:15px;font-size:13px;color:#000000; font-family:Arial, Helvetica, sans-serif;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; padding:10px 0 10px 0;"><strong>COLUMN 1</strong></td>
            <td width="131" align="center" bgcolor="#CCCCCC" class="halfWidth" style="mso-line-height-rule:exactly;line-height:15px;font-size:13px;color:#000000; font-family:Arial, Helvetica, sans-serif;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; padding:10px 0 10px 0;"><strong>COLUMN 2</strong></td>
            </tr>
          </table>
        <table width="262" border="0" align="right" cellpadding="0" cellspacing="0" class="fullWidth">
          <tr>
            <td width="131" align="center" bgcolor="#999999" class="halfWidth" style="mso-line-height-rule:exactly;line-height:15px;font-size:13px;color:#000000; font-family:Arial, Helvetica, sans-serif;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; padding:10px 0 10px 0;"><strong>COLUMN 3</strong></td>
            <td width="131" align="center" bgcolor="#666666" class="halfWidth" style="mso-line-height-rule:exactly;line-height:15px;font-size:13px;color:#000000; font-family:Arial, Helvetica, sans-serif;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; padding:10px 0 10px 0;"><strong>COLUMN 4</strong><br /></td>
            </tr>
          </table>
  <!-- //4 COLUMN DESKTOP/2 COLUMN STACKED MOBILE --> 
        
        </td>
      </tr>
    </table>

<br />

<!-- STYLED TABLE TO EMULATE A GRADIENT FADE HR -->
<table width="100%" height="1" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td width="5%" height="1" bgcolor="#EBEBEB" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#D6D6D6" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#C1C1C1" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#ACACAC" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#979797" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#828282" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#6D6D6D" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#585858" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#434343" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#2E2E2E" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td> 
    <td width="5%" height="1" bgcolor="#2E2E2E" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#434343" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#585858" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#6D6D6D" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#828282" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#979797" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#ACACAC" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#C1C1C1" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#D6D6D6" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
    <td width="5%" height="1" bgcolor="#EBEBEB" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
  </tr>
</table>
<!-- //STYLED TABLE TO EMULATE A GRADIENT FADE HR -->

<br />

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000; text-align:center;"><strong>Ghost Column Outlook Hacks</strong><br />
      (Allows   tables to align that are<strong> touching</strong>)<br />
      This is unneccessary if the tables have ~5px between them like the 4-col layout<br /></td>
  </tr>
</table>

<!-- 3-COL GHOST COLUMN LAYOUT -->

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td width="100%">   

    <table width="177" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="177" align="center" bgcolor="#FF0000" class="fullWidth vertPadding" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">1</td>
      </tr>
    </table>
    <!--[if mso]></td><td><![endif]-->            
    <table width="176" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="176" align="center" bgcolor="#00FF00" class="fullWidth vertPadding" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">2</td>
      </tr>
    </table>
    <!--[if mso]></td><td><![endif]--> 
    <!-- !IMPORTANT! When using the 3-col, the last table on the right must have no alignment, otherwise it will break. -->
    <table width="177" border="0" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="177" align="center" bgcolor="#0066FF" class="fullWidth vertPadding" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">3</td>
      </tr>
    </table>

    </td>
  </tr>
</table>
<!-- //3-COL GHOST COLUMN LAYOUT --><br />

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000; text-align:center;"> This structure can be used if you want white space between tables with BGs in desktop and mobile</td>
  </tr>
</table>

<!-- 3-COL GHOST COLUMN LAYOUT WITH WHITE SPACE -->

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td width="100%">   

    <table width="177" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="177" align="center" class="fullWidth" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">
        
        <table width="170" border="0" align="center" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="170" align="center" bgcolor="#FF0000" class="fullWidth" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">1</td>
      </tr>
    </table>
        
        </td>
      </tr>
    </table>
    <!--[if mso]></td><td><![endif]-->            
    <table width="176" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="176" align="center" class="fullWidth paddingTop" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">
        
        <table width="170" border="0" align="center" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="170" align="center" bgcolor="#00FF00" class="fullWidth" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">2</td>
      </tr>
    </table>
        
        </td>
      </tr>
    </table>
    <!--[if mso]></td><td><![endif]--> 
    <!-- !IMPORTANT! When using the 3-col, the last table on the right must have no alignment, otherwise it will break. -->
    <table width="177" border="0" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="177" align="center" class="fullWidth paddingTop" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">
        
        <table width="170" border="0" align="center" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="170" align="center" bgcolor="#0066FF" class="fullWidth" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000;">3</td>
      </tr>
    </table>
        
        </td>
      </tr>
    </table>

    </td>
  </tr>
</table>
<!-- //3-COL GHOST COLUMN LAYOUT WITH WHITE SPACE -->

<br />

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:none;-ms-text-size-adjust:none; font-family:Arial, Helvetica, sans-serif;font-size:15px;line-height:18px;color:#000000; text-align:center;"> When images or text with no BG are used, you can add add vertical padding for white space in mobile stack</td>
  </tr>
</table>

<!-- 2-COL GHOST COLUMN LAYOUT -->
<!-- *NOTE*: The Gmail/Android app causes a weird stacking bug to occur with this layout. The only way I've been able to correct it (when using images) is to equalize all widths to what they should be, then subtract 1px from both the left and right images, then align their TDs right and left so that there's no gap between the images in other clients. -->

<table class="fullWidth" width="530" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="fullWidth" width="530">   

    <table width="265" border="0" align="left" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="265" align="right" class="fullWidth" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;"><img src="http://placehold.it/264x100&amp;text=Left" alt="" border="0" class="fullWidth" /></td>
      </tr>
    </table>
    <!--[if mso]></td><td><![endif]-->            
    <table width="265" border="0" cellpadding="0" cellspacing="0" class="fullWidth">
      <tr>
        <td width="265" align="left" class="fullWidth paddingTop" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;"><img src="http://placehold.it/264x100&text=Right" alt="" border="0" class="fullWidth" /></td>
      </tr>
    </table>     

    </td>
  </tr>
</table>
<!-- //2-COL GHOST COLUMN LAYOUT -->


        
<!-- //THIS IS THE END OF THE DEMO CONTAINER -->  
          </td>
        <td width="25" class="contentInnerMargin" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
      </tr>
    </table>

</td>
    <td class="outerMargin" width="10" style="font-size:0px;mso-line-height-rule:exactly;line-height:0px;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;">&nbsp;</td>
  </tr>
</table>
            
          
!

CSS

            
              @media only screen and (max-width: 480px) {
/**** General ****/	
.hide {display: none !important;}

/* Global widths */
.deviceWidth {width:320px !important; padding:0 0 !important;}
.fullWidth {width:100% !important; height:auto !important;}
.halfWidth {width:50% !important;}

/* Layout-specific widths */
.deviceWidth-margins {width:300px !important; height:auto !important; padding:0 0 !important;}
.outerMargin {width:10px !important;}
.contentBoxOuter {width:310px !important;}
.contentInnerMargin {width:15px !important;}
.contentBoxInner {width:280px !important;}
.contentHero {width:280px !important; line-height:22px !important; padding-top:10px !important;}

/* Grow or shrink CTA button and font size. (Currently increase font size only) */
.CTA-adjust {width:280px !important; font-size:35px !important;}
.CTA-test {width:280px !important; font-size:35px !important;}

/* FIX ROLLOVER IMAGE FOR MOBILE. ONLY STATIC, NO HOVER */
.rolloverMobile {width:280px !important; height:205px !important; background-size: 100% !important;}

/*** Font sizes and alignment for mobile ****/
.big {font-size:32px !important; line-height:32px !important; font-weight:bold !important;}
.medium {font-size:24px !important; line-height:26px !important;}
.small {font-size:13px !important; line-height:17px !important;}

.left {text-align: left !important;}
.center {text-align: center !important;}
.right {text-align: right !important;}

/*** Padding ****/
.killPadding { padding: 0 0 0 0!important; }
.paddingTop { padding: 10px 0 0 0!important; }
.paddingBottom { padding: 0 0 10px 0!important; }
.vertPadding { padding:15px 0!important; }
.sidePadding { padding:0 10px !important; }

/**** Image Swapping ****/
span[id=swap] {
display:block;
background-image: url(http://www.streamcompanies.com/email/test/kwyjibo/images/bub2.jpg) !important;
background-repeat: no-repeat !important;
background-position: center !important;
width: 300px !important; /* MUST REFLECT IMAGE'S DIMMENSIONS */
height: 300px !important; /* MUST REFLECT IMAGE'S DIMMENSIONS */
padding:0;
}

}
            
          
!

JS

            
              
            
          
!
999px

Console