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>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<style>
  body{  
    -webkit-text-size-adjust:100%; 
    }

  /* 
    FAUX-FIXED: Fixed Object Scrolling Content Interactive Email Technique
    By: Justin Khoo @freshinbox

    Clients supported:
    - iOS: Mail, Gmail, Yahoo! Mail App
    - Android: Samsung Client, Gmail App
    - Mac: Mail, Outlook
    - Webmail: Gmail, Yahoo! Mail, AOL

    Clients specifically excluded:;
    - GANGA - no style support
    - Outlook.com - does not work in Chrome browser
    - Outlook iOS/Android
    - Outlook desktop/Windows 10 - conditional comments block
    - Windows 10 mobile - no media query support
    - Yahoo! Mail Android - style support only in body
    - Android 4.4 - Native, Gmail
  */


  /*
  iOS: Mail, Gmail, Inbox, Yahoo! Mail, Outlook;
  Android: Samsung, Gmail, Inbox, Outlook (need to block);
  Mac: Outlook, Apple Mail;
  Webmail: Gmail, Yahoo! Mail, AOL Mail;
  */
  .yfix{}
  @media screen {
    .interactive {
      display:block!important;
      max-height:none!important;
      overflow:visible!important;
      max-width:100%;
    }
    .fallback{
      display:none;
    }
  }

  @media (max-device-width:800px)   { 
    /* 
    Block for Android 4.4 using calc(vh)
    We don't filter by (min-resolution: .001dpcm) because 4.4 native doesn't respond to it
    while 4.4 Gmail does(?)
     */

    .interactive {
      display:block!important;
      overflow:hidden!important;
      max-height:0px!important;
      max-height:calc(100vh + 1000px)!important;
    }
    .fallback{
      display:block!important;
      overflow:hidden!important;
      max-height:none!important;
      max-height:calc(0vh - 1000px)!important;
    }
  }

  /* 
    Code to block Outlook on Android.
    The following "Chrome" specific media queries only allow 2 Android clients through
     - Samsung & Outlook
    (Gmail doesn't support -webkit-min-device-pixel-ratio, Android 4.4 does not respond to min-res)
  */
  .yfix{}
  @media (max-device-width:800px) and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) { 
    /* Block for Samsung and Outlook Android */
    .interactive {
      display:none!important;
    }
    .fallback{
      max-height:none!important;
    }
    /* Reenable on Samsung only: 
      Outlook on android does not support summary attribute */
    .interactive[summary="block-outlook-android"] {
      display:block!important;
    }
    .fallback[summary="block-outlook-android"] {
       max-height:calc(0vh - 1000px)!important;
    }
  }

  @media screen and (max-device-width:800px){
    /* no need space for scrollbars in mobile */
    .container{
      width:400px!important;
    }
  }

</style>
</head>
<body>

<table width="100%"><tr><td>

<!--[if !mso]><!-->
<div class="interactive" summary="block-outlook-android" style="display:none;max-height:0px;overflow:hidden;">
  <div class="container" style="width:420px;margin:0 auto;">
    <!-- "absolute" position ball -->
    <div style="height:0px;max-height:0px;overflow:visible!important;">
      <div style="display:inline-block;position:relative;opacity:0.999;margin-top:100px;margin-left:166px;width:70px;"><img src="http://freshinbox.com/examples/faux-fixed/images/bball.png" width="100%"></div>
    </div>
    <!-- scrolling canvas -->
    <div style="height:360px;max-height:400px;overflow:auto;border:2px solid black;background-color:#97defb;">
      <div style="height:630px;background-image:url('http://freshinbox.com/examples/faux-fixed/images/bball-short-background.png')">
      <img src="http://freshinbox.com/examples/faux-fixed/images/bball-short-foreground.png" style="display:block;width:100%;position:relative;opacity:0.999;">
      </div>
    </div>
  </div>
</div>  
<!--<![endif]-->

<div class="fallback" summary="block-outlook-android">
<center>
  <img src="http://freshinbox.com/examples/faux-fixed/images/bball-sad.png" width="400" style="max-width:100%;display:block;">
</center>
</div>

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

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

Console