Horizontal emails? How 2010!

Horizontal emails? How 2010!

While Bex is away, the dev team are taking over for the week. We could have uploaded the usual articles we found for the email industry, but we’d like to add something extra to the email this week!

 We decided to try and tweak the layout so it scrolls horizontally…

The idea sounds simple enough and it has been done before, but several years ago. We took the opportunity to revisit this technique of displaying email content. The results were quite unexpected.

The code we used for the scrolling was simply applying a fixed width on a container with overflow set to scroll. The content in the container was stacked horizontally and was wider than the container. This enabled the content to be scrollable. 

 

For Apple iOS

<style>
       /*    FOR APPLE IOS ONLY*/
       @supports (-webkit-overflow-scrolling:touch) and (color:#ffff) and (display: grid){
           #mainarticles{
               width:100vw!important;
               overflow-y:hidden!important;
               overflow-x:scroll!important;
           }
           .grid-container{
               width:4080px!important;
               display: block!important;
               grid-template-columns: none!important;
               grid-gap: 0px!important;
           }
           .grid-item{
               float:left!important;
               max-width:320px!important;
           }
           /* Scrollbar styles */
           ::-webkit-scrollbar {
               width: 12px;
               height: 12px;
           }
           
           ::-webkit-scrollbar-thumb {
               background: #6C6C67;
               border-radius: 10px;
           }
           
       }
       _:-webkit-full-screen,
       _::-webkit-full-page-media,
       _:future,
       :root .body:not(.Singleton) #mainarticles{
           width:100vw!important;
           overflow-y:hidden!important;
           overflow-x:scroll!important;
       }
       :root .body:not(.Singleton) .grid-container{
           width:4080px!important;
           display: block!important;
           grid-template-columns: none!important;
           grid-gap: 0px!important;
       }
       :root .body:not(.Singleton) .grid-item{
           float:left!important;
           max-width:320px!important;
       }
</style>

For Gmail Webmail

<style>
/*        gmail web*/
       @media screen and (min-width: 480px){
           u + .body .gmail #mainarticles{
               width:1000px!important;
               overflow-y:hidden!important;
               overflow-x:scroll!important;
               margin:0 auto!important;
           }
           u + .body .gmail .grid-container{
               width:4080px;
               display:block!important;
               grid-template-columns:0!important;
           }
           u + .body .gmail .grid-item{
               float:left!important;
               max-width:320px!important;
           }
           u + .body .gmail .footer{
               width:880px;
               margin:0 auto;
           }
               /* Scrollbar styles */
           ::-webkit-scrollbar {
               width: 12px;
               height: 12px;
           }
           
           ::-webkit-scrollbar-thumb {
               background: #6C6C67;  
               border-radius: 10px;
           }
       }
   </style>

Another method we tried was to apply transform rotate and translate styles to the content but this was only supported in iOS devices and Mac Outlook. 

We found that the overflow technique only worked in iOS devices, Gmail webmail and Outlook for Mac. The overflow technique didn’t work for Apple Mail despite it working on iOS.

Back when they were first sent, circa 2010, they appeared to be useful, stylish and innovative. But that was 9 years ago. The tech has moved forward quite a bit and users experience of reading emails on devices has also changed. This is due to the fact that most of our browsing occurs vertically rather than horizontally. But also because the devices we use favour vertical over horizontal scrolling. 

For instance, Gmail for Android, swiping left and right switches between previous and next emails. Switching between emails has precedence over scrolling left and right in the email body. 

On desktop, unless you use a trackpad or an Apple Mighty Mouse, you’re limited to using a typical vertical scroll wheel.

So in the end, horizontal scrolling emails will work mostly on iOS devices only. The code is supported in other devices, but generally there are hardware and software limitations that prevent the email from working as intended. 

Check out our example of the email working horizontally where it is supported here.