{"id":2129,"date":"2015-08-25T18:09:13","date_gmt":"2015-08-25T18:09:13","guid":{"rendered":"http:\/\/freshinbox.com\/blog\/?p=2129"},"modified":"2016-10-19T02:42:14","modified_gmt":"2016-10-19T02:42:14","slug":"image-carousel-for-email-tool","status":"publish","type":"post","link":"https:\/\/freshinbox.com\/blog\/image-carousel-for-email-tool\/","title":{"rendered":"Image Carousel for Email Tool"},"content":{"rendered":"<p><I><B>Update Oct 2016:<\/B> With the new responsive email update, the carousel no longer works in Gmail<\/I><BR><BR><\/p>\n<p>Here&#8217;s a tool that lets you <a href=\"https:\/\/freshinbox.com\/resources\/tools\/carousel\/\">build an image carousel<\/a> 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.<\/p>\n<p>Unsupported clients are Outlook.com and the usual culprits Outlook 2007-2013, Gmail mobile app and Gmail for Business. These clients will only display the first image without thumbnails.<BR><BR><\/p>\n<div style=\"border:1px solid #dddddd\">\n<a href=\"https:\/\/freshinbox.com\/resources\/tools\/carousel\/\"><img decoding=\"async\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/carousel-tool.jpg\" alt=\"carousel-tool\" width=\"450\" class=\"aligncenter size-full wp-image-2132\" style=\"width:100%;\" srcset=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/carousel-tool.jpg 700w, https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/carousel-tool-300x189.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/div>\n<p><center><a href=\"https:\/\/freshinbox.com\/resources\/tools\/carousel\/\" style=\"display:inline-block;padding:10px 30px;background-color:#2ea2cc;text-decoration:none;color:#fafafa;border-radius:5px;\"><b>Try the carousel builder tool<\/b><\/a><\/center><BR><BR><\/p>\n<h4>Details<\/h4>\n<p>The technique behind this image carousel is very similar to the <a href=\"https:\/\/freshinbox.com\/blog\/interactive-tabs-for-email\/\">Tabs for Email<\/a> example, the difference being the &#8220;tabs&#8221; are thumbnails and they are placed after the content.  I wrote an <a href=\"https:\/\/freshinbox.com\/blog\/how-to-create-an-image-carousel-for-email-part-2\/\">earlier carousel example<\/a> 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&#8217;t work in Outlook.com, unfortunately.<BR><BR><\/p>\n<h4>Fallback<\/h4>\n<p>In the generated code, there&#8217;s a fallback section with a <code>fallback<\/code> 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 <a href=\"https:\/\/freshinbox.com\/blog\/shopping-in-email-add-to-cart\/\">displaying all images in a grid<\/a> or an animated gif like the fallback for <a href=\"https:\/\/freshinbox.com\/blog\/nest-email-carousels\/\">Nest&#8217;s carousel<\/a>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-fallback.gif\" alt=\"car-fallback\" width=\"367\" height=\"68\" class=\"aligncenter size-full wp-image-2159\" \/><BR><BR><\/p>\n<h4>Customizations<\/h4>\n<p><BR><b>1) More than one carousel per email.<\/b><\/p>\n<p>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 <code>car-rd1<\/code> to another value such as <code>car-rd2<\/code>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-name.gif\" alt=\"car-name\" width=\"511\" height=\"77\" class=\"aligncenter size-full wp-image-2148\" \/><BR><BR><\/p>\n<p><b>2) Adjust thumbnail size.<\/b><\/p>\n<p>The thumbnail size was set to accomodate five thumbnails in a row. It was also set using percentages so the carousel can be responsive &#8211; 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 <code>thumb<\/code> class.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-width2.gif\" alt=\"car-width2\" width=\"441\" height=\"123\" class=\"aligncenter size-full wp-image-2150\" \/><BR><BR><\/p>\n<p><b>3) Change thumbnail border color.<\/b><\/p>\n<p>Here&#8217;s where you need to edit to change the default, hover and selected thumbnail border colors:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-border2.gif\" alt=\"car-border2\" width=\"503\" height=\"272\" class=\"aligncenter size-full wp-image-2157\" \/><BR><BR><\/p>\n<p><b>4) Inset thumbnails.<\/b><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-inset-pic.jpg\" alt=\"car-inset-pic\" width=\"320\" height=\"216\" class=\"aligncenter size-full wp-image-2152\" srcset=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-inset-pic.jpg 320w, https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-inset-pic-300x202.jpg 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>You may prefer the thumbnails to appear over the images in the carousel. I haven&#8217;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.<\/p>\n<p>You can do this by replacing the max-height value from <code>none<\/code> to a value that is <b>smaller<\/b> than the actual height value of the image. Also, set the height of the carousel to the height of the image.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-inset-code1.gif\" alt=\"car-inset-code1\" width=\"520\" height=\"226\" class=\"aligncenter size-full wp-image-2153\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2015\/08\/car-inset-code2.gif\" alt=\"car-inset-code2\" width=\"525\" height=\"102\" class=\"aligncenter size-full wp-image-2154\" \/><\/p>\n<p><BR><BR><\/p>\n<h4>Next Steps<\/h4>\n<p>If enough folks find this useful, I have a few things that I&#8217;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!<\/p>\n<p><BR><BR><BR><br \/>\n<div style=\"padding:10px; border: 2px solid #99C731;background-color:#FFF8DC;border-radius:5px;\">\n<form action=\"https:\/\/freshinbox1.createsend.com\/t\/i\/s\/adrmi\/\" method=\"post\" id=\"subForm\">\n<span class=\"fisub_header\" style=\"font-weight:bold;\">Subscribe to the #EmailGeeks Newsletter<\/span>\n<p><input id=\"fieldEmail\" name=\"cm-adrmi-adrmi\" type=\"email\" style=\"width:90%\" required placeholder=\"Your Email Address\" \/><\/p>\n<p><button type=\"submit\">Subscribe<\/button><\/p>\n<\/form>\n<\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a tool that lets you <a href=\"http:\/\/freshinbox.com\/resources\/tools\/carousel\/\">build an image carousel<\/a> 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&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2131,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,28,25,47],"tags":[],"_links":{"self":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/2129"}],"collection":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/comments?post=2129"}],"version-history":[{"count":24,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/2129\/revisions"}],"predecessor-version":[{"id":2147,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/2129\/revisions\/2147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media\/2131"}],"wp:attachment":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media?parent=2129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/categories?post=2129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/tags?post=2129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}