Image Carousel for Email Tool

Update Oct 2016: With the new responsive email update, the carousel no longer works in Gmail

Here’s a tool that lets you build an image carousel for email that displays up to five images. In addition to the modern mobile clients such as the iOS Mail and Android 4.x Mail clients, the generated carousel works in Yahoo! Mail and Gmail webmail as well.

Unsupported clients are and the usual culprits Outlook 2007-2013, Gmail mobile app and Gmail for Business. These clients will only display the first image without thumbnails.

Try the carousel builder tool


The technique behind this image carousel is very similar to the Tabs for Email example, the difference being the “tabs” are thumbnails and they are placed after the content. I wrote an earlier carousel example that uses the :hover selector that works with more clients, however that example is a lot more difficult to implement. Since this example uses the :checked selector, it won’t work in, unfortunately.


In the generated code, there’s a fallback section with a fallback class. The content here gets displayed to any client that does not support the carousel. The tool puts the first image there as fallback but you can swap it out with any other content such as a table displaying all images in a grid or an animated gif like the fallback for Nest’s carousel.



1) More than one carousel per email.

If you want to have more than one carousel in a single email you need to ensure that each set of radio buttons have their own unique name. For each set, change the radio input names from car-rd1 to another value such as car-rd2.


2) Adjust thumbnail size.

The thumbnail size was set to accomodate five thumbnails in a row. It was also set using percentages so the carousel can be responsive – it can scale with the width of its container. You can change the size and spacing of the thumbnails by changing the width and margin of the thumb class.


3) Change thumbnail border color.

Here’s where you need to edit to change the default, hover and selected thumbnail border colors:


4) Inset thumbnails.


You may prefer the thumbnails to appear over the images in the carousel. I haven’t found a way to make this responsive, but if you are happy with a fixed width carousel (uncheck the responsive checkbox), you can set the the max-height of the divs enclosing the images so that the thumbnails overlay part of the image.

You can do this by replacing the max-height value from none to a value that is smaller than the actual height value of the image. Also, set the height of the carousel to the height of the image.



Next Steps

If enough folks find this useful, I have a few things that I’d like to add to this tool in the future such as the ability to specify fallback content, change thumbnail border colors, alternate carousel layout options and more!

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *