I'm Salman Rahman
How to add a thumbnail image/photo gallery in Blogger
HomeBlog DesignWidgets

How to add a thumbnail image/photo gallery in Blogger

For those who would like to show pictures in an image gallery, here's a beautiful gallery made with JavaScript and CSS. This image galle...

For those who would like to show pictures in an image gallery, here's a beautiful gallery made with JavaScript and CSS. This image gallery displays the available thumbnails either vertically or horizontally on top of the chosen picture, thus making it easier for you to pick different images on mouse click.

With the help of CSS, we can make the <img> element to display on same position with the rest of the thumbs and style the thumbnails as small blocks with a defined height and width. The script will add a click-event for each <li> object that changes it's child's <img> visibility and will assign an "active" class name to the <li>.

Related: Image Slider with Mouse Hover Effect using CSS only


How to Add Image Gallery with Thumbnails to Blogger

Step 1. Log in to your Blogger account, select your blog and go to "Template", press the "Edit HTML" button.


Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the search box:


Step 3. Type the following tag inside the search box and hit Enter to find it:
</head>
Step 4. Now pick one of the styles below and copy the code below it:


<style type='text/css'>
#image-gallery {display: none;}
  #jquery-gallery {padding:0;margin:0;list-style: none; width: 500px;}
  #jquery-gallery li {width:84px; height: 80px;background-size: 100%;-webkit-background-size: cover;-moz-background-size: cover; -o-background-size: cover;background-size: cover;margin-right: 10px; border: 3px solid #fff; outline: 1px solid #E3E3E3; margin-bottom: 10px;opacity: .5; filter:alpha(opacity=50); float: left; display: block; }
#jquery-gallery li img { position: absolute; top: 100px; left: 0px; display: none;}
  #jquery-gallery li.active img { display: block; border: 3px solid #fff; outline: 1px solid #E3E3E3; width:490px; max-height: 375px;}
  #jquery-gallery li.active, #jquery-gallery li:hover { outline-color: #DFDFDF; opacity: .99;filter:alpha(opacity=99);}
#gallery-caption {background: rgba(0, 0, 0, 0.3);color: #fff;font-size: 16px;font-weight: bold;left: 3px;position: absolute;text-align: center;top: 103px;width: 490px;text-transform: uppercase;}
</style>


<style type='text/css'>
#image-gallery { display: none; }
#jquery-gallery {padding:0;margin:0;list-style: none; width: 200px; }
#jquery-gallery li {background-size: 100%;-webkit-background-size: cover;-moz-background-size: cover; -o-background-size: cover;background-size: cover;margin-right: 10px; width: 80px; height: 80px; border: 3px solid #fff; outline: 1px solid #ddd; margin-right: 10px; margin-bottom: 10px; opacity: .5;filter:alpha(opacity=50); float: left; display: block; }
#jquery-gallery li img { position: absolute; top: 0px; left: 200px; display: none; }
#jquery-gallery li.active img { display: block; width:370px; border: 3px solid #fff; outline: 1px solid #E3E3E3; }
#jquery-gallery li.active, #jquery-gallery li:hover { outline-color: #bbb; opacity: .99;filter:alpha(opacity=99);}
#gallery-caption {background: rgba(0, 0, 0, 0.3);color: #fff;font-size: 16px;font-weight: bold;text-transform: uppercase;margin: 0 -17px;position: absolute;right: 0;text-align: center;top: 3px;width: 370px;}
</style>
Note: The display: none; for the first ID (#image-gallery) is to prevent images appear with their actual size before they go inside the gallery container.

In #jquery-gallery we have the width of the container for the thumbnails (200px), so that they display in two rows and for this we need to calculate the width of the thumbnail (80px) plus the margins between them.

The left declaration of #jquery-gallery li img is to move the larger thumbnail that shows on mouse click so that it doesn't overlap with the smaller thumbnails.

Step 5. Paste the code of the chosen style just above the </head> tag.

Step 6. Now above the same </head> tag, add this script:
<script type='text/javascript'>
//<![CDATA[
var gal = {
init : function() {
if (!document.getElementById || !document.createElement || !document.appendChild) return false;
if (document.getElementById('image-gallery')) document.getElementById('image-gallery').id = 'jquery-gallery';
var li = document.getElementById('jquery-gallery').getElementsByTagName('li');
li[0].className = 'active';
for (i=0; i<li.length; i++) {
li[i].style.backgroundImage = 'url(' + li[i].getElementsByTagName('img')[0].src + ')';
li[i].title = li[i].getElementsByTagName('img')[0].alt;
gal.addEvent(li[i],'click',function() {
var im = document.getElementById('jquery-gallery').getElementsByTagName('li');
for (j=0; j<im.length; j++) {
im[j].className = '';
}
this.className = 'active';
document.getElementById('gallery-caption').innerHTML = this.title;
});
}
},
addEvent : function(obj, type, fn) {
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
}
else if (obj.attachEvent) {
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent("on"+type, obj[type+fn]);
}
}
}
gal.addEvent(window,'load', function() {
gal.init();
});
//]]>
</script>
Basically, what this script does is to check if there is any ID named "image-gallery" and get the different list items that may exist within it. These elements will be displayed as thumbnails and a function will decide what to do once they are clicked. So, each time we click on a thumbnail, the "active" class will be assigned and the thumbnail should be visible in the larger container.

Step 7. Finally, save the changes by clicking the "Save template" button.

And here's the HTML code providing a normal list with the image-gallery ID, enclosed within a DIV with a relative position in order to avoid side effects of other pre-existing positions.

Step 8. Paste the below HTML to where you want to display the gallery by going either to "Layout" and adding a new gadget (click on the "Add a gadget" link and choose "HTML/JavaScript" option), or inside a post/page in the HTML section.
<div style="position:relative;">
<ul id="image-gallery">
<li><img src="IMAGE-URL1" /></li>
<li><img src="IMAGE-URL2" /></li>
<li><img src="IMAGE-URL3" /></li>
<li><img src="IMAGE-URL4" /></li>
<li><img src="IMAGE-URL5" /></li>
</ul>
</div>
Note: if elements on your page overlap with this gallery, you might need to add the height declaration after "position: relative;". The value of height depends on the size of your gallery.

Example:
<div style="position:relative; height: 500px;"> 
Change IMAGE-URL1 with the image URL. If you don't know how to get the address of an image, see this tutorial: How to Upload Images and Get the URL

In case you need to make the pictures clickable, add this HTML structure instead:
<div style="position:relative;">
<ul id="image-gallery">
<li><a href="page-URL"><img src="IMAGE-URL1" /></a></li>
<li><a href="page-URL"><img src="IMAGE-URL2" /></a></li>
<li><a href="page-URL"><img src="IMAGE-URL3" /></a></li>
<li><a href="page-URL"><img src="IMAGE-URL4" /></a></li>
<li><a href="page-URL"><img src="IMAGE-URL5" /></a></li>
</ul>
</div>
Again, here you need to replace the page-URL text with the URL of your page/post.

Update: To add captions, please include the lines in orange and then replace the "Caption" with the text that you want to appear on each picture:
<div style="position:relative;">
<ul id="image-gallery">
<li><a href="page-URL"><img alt="Caption" src="IMAGE-URL1" /></a></li>
<li><a href="page-URL"><img alt="Caption" src="IMAGE-URL2" /></a></li>
<li><a href="page-URL"><img alt="Caption" src="IMAGE-URL3" /></a></li>
<li><a href="page-URL"><img alt="Caption" src="IMAGE-URL4" /></a></li>
<li><a href="page-URL"><img alt="Caption" src="IMAGE-URL5" /></a></li>
</ul>
<div id="gallery-caption"></div>
</div>

Save the widget or publish your page and you're done adding the thumbnail image / photo gallery in Blogger.
Name

12 months seo strategy,1,2018 elections,2,Aaron Rodgers,1,abortion,1,actors,1,Adam Liptak,1,adsense,7,adsense optimization,2,adsense tips,3,advertising,3,Affiliate Marketing,1,aging,2,airplanes,2,Al Franken,1,Alito,1,Althouse + Meade,1,analogies,4,Anderson Cooper,1,Andrew Dice Clay,1,Android,1,Annie Lowrey,1,Anthony Weiner,1,apologies,2,Apple,1,Apple News,1,Apple Watch,1,Ariana Grande,3,art,1,art and politics,1,avocado,1,backlinks,2,bad art,1,bad science,2,bananas,1,baseball,1,Basquiat,1,BEGINNER GUIDES,1,Beginner to blogging,14,beginner's guide,4,Beginners Guide,1,Ben Carson,1,Ben Sasse,2,Berkeley Breathed,1,biking,1,Bill Cosby,1,Bill Murray,1,Bing webmaster tools tutorials,2,birth control,1,blog commenting,1,Blog Design,59,blogger,6,blogger adsense,3,Blogger menus,10,blogger pages,4,blogger posts,11,Blogger Seo(Search Engine Optimization,19,Blogger Tips And Tricks,32,Blogger Widgets And Gadgets,30,Blogging,10,Bob Woodward,1,body parts,1,body-slamming,5,books,4,boredom,3,Boston bombing,1,brain,1,bras,1,breasts,2,Breivik,1,Bret Weinstein,1,BuzzFeed,1,campaign finance,1,camping,1,capitalism,1,careers,1,censorship,1,Chaplin,1,charity,1,Charles Murray,1,Cher,1,chess,1,children,2,China,3,Chris Cornell,2,Chris Cuomo,1,Christianity,1,Clarence Thomas,1,click bombing,1,Clint Eastwood,1,Cloud,5,Cloud Backup,5,Cloud Storage,5,coffee,1,coinages,1,comedy,4,Comey,12,comic juxtapositions,1,comics,1,Comments,9,commerce,2,communism,2,computers,2,conspiracies,1,Content Marketing,6,conversation,1,courage,1,crazy,1,crime,2,css,28,custom domain,2,dancing,3,dead,1,death,2,debates,1,Definitive Guide of Magento SEO,1,Democratic Party in Trumpland,2,diversity politics,1,dogs,3,Domains / Blogger,1,Down Syndrome,1,drugs,2,Drupal,1,Dylan,2,earn money blogging,16,eCommerce,1,eCommerce Trends,1,economics,1,EDH,1,education,2,Edward Albee,1,Egypt,1,el-Sisi,1,elephant,1,Elizabeth Taylor,1,Emma Stone,1,emotion,1,emotional politics,1,Entrepreneurship,1,ENTREPRENEURSHIP &STARTUP,1,environmentalism,1,Ethical Backlinking Methods,2,ethics,1,etiquette,1,evidence,1,evil,1,excrement,1,Expert Roundup,3,Face the Nation,1,Facebook,6,Facebook widgets in blogger,5,fake,3,fake news,2,fashion,5,fat,1,FBI,2,feminism,6,fingernails,1,fire,1,firebug,1,Firefox OS,1,fish,1,flowers,9,font awesome,1,Foucault,1,Fox News,2,France,1,Frank Lloyd Wright,1,free schedule social media posts,1,free speech,5,Freebies,1,freedom,2,Freelance Tips,5,furniture,1,gender difference,2,gender politics,1,genitalia,2,geology,1,George Carlin,1,Germany,2,gestures,3,ghost,1,Gianforte,2,global warming,1,God,1,Googe Doodle,1,Google,5,Google Ad Planner,1,Google AdWords,1,Google Algorithm,4,Google Announcements,2,Google Authorship Program,1,Google backlinks strategies,4,Google Dance,1,Google Maps,1,Google Optimize,1,Google PageRank,2,Google Panda Update,1,Google Places,2,google plus,5,Google Queen Doodle,1,Google rich snippets blogger,1,Google Search Engine Optimization,1,Google Webmaster tools,2,Google Webmaster Tools tutorials,9,Google's Penguin update,3,Google+ Custom URL,1,Google+ Events,1,Google+ Local,3,Google+ Places,1,Grace Kelly,1,Gretchen Carlson,1,hairstyles,1,Harvard,1,hats,1,headlines,3,health,2,hearsay,1,Hillary 2016,3,Hillary goes away,1,hipsters,2,history,1,Hitchcock,1,hombre,1,homepage,1,hot,1,how to,55,HTC,1,html,3,hypocrisy,2,I am making a new tag for this,1,I'm not making a tag for this,1,I'm skeptical,2,Image Effects,13,impeachment,2,India,2,Infographic,1,insanity,1,insects,2,instagram,3,Instapundit,3,insults,3,Internet Marketing,11,Internet.org,1,invalid clicks,1,Iran,1,irony,1,ISIS,3,Islam,2,Israel,3,iwatch,1,Jackie Kennedy,1,Jake Tapper,1,James Bond,1,James Hamblin,1,Japan,1,Jared Kushner,1,javascript,10,Jerusalem,1,Jesse Singal,1,Jesse Ventura,1,Jesus,1,Jia Tolentino,1,Jimmy Fallon,1,JK Rowling,1,Joe Scarborough,1,John Belushi,1,John Dickerson,2,John Glenn,1,Jonathan Turley,1,journalism,4,jQuery,16,Julian Assange,2,Karl Marx,3,Kellyanne Conway,1,Kerry,1,kissing,1,labels,2,labor,2,Lake Monona,1,language,4,law,18,lawyers,1,laziness,1,LePage,1,LG,1,Lieberman,1,Link schemes,1,litigiousness,1,Local Search Optimization,1,Local SEO,6,Loretta Lynch,1,lying,1,Madison,2,Magento,1,Magento SEO,1,Magento SEO Guide,1,Maine,1,Make Money Onile,1,MAKE MONEY ONLINE,6,Manafort,1,Marketing Strategies,4,marriage,1,masculine beauty,1,masculinity,2,Matt Taibbi,1,Matthew Sablan,1,Maurice Sendak,1,McMaster,1,Media Buying,1,Megyn Kelly,1,Melania,5,men in shorts,1,menstruation,2,menus,7,Meryl Streep,1,Meta Robots,1,Meta Tag,2,metaphor,2,Michael Flynn,1,Michelle O,1,Mika Brzezinski,1,Mike Pence,1,MisterBuddwing,1,Mitt Romney,1,Mobile,7,Mobile Blogging,13,Mobile Marketing,3,Mobile Search,1,Molly Ball,1,montana,1,morality,1,Motorola or Sony,1,movies,4,Mozilla,1,Mozilla Mobile,1,Mozilla OS,1,MSM reports what's in social media,1,Mueller,2,murder,3,music,4,names,1,Navigation,5,navigation menu,5,Nazis,2,nervous,2,News,2,Nixon,1,normal,3,North Carolina,1,nyt,2,Obama and foreign policy,1,oDesk Tips,1,OED,1,order and chaos,1,PageSpeed,1,Paglia,1,partisanship,1,pasta,1,Paul Anka,1,Paul Theroux,2,Paul Zrimsek,1,Peggy Noonan,1,perfume,1,Peter Pan,1,Phillippe Reines,1,philosophy,3,photography,10,photoshopping,2,PHYSICS,1,Pierre Bayard,1,plants,2,political correctness,2,polyamory,1,Pope,2,popular posts,5,posts,11,poverty,1,PPC,1,President Trump,8,Prince,1,propaganda,2,protest,2,psychology,5,Putin,1,race and education,1,race and law,1,race and pop culture,1,race consciousness,1,racial politics,1,Ramesh Ponnuru,1,rape,3,Rebecca Traister,1,recent comments,1,recent posts,3,Reddit,1,redistricting,1,Reince Priebus,1,rel=author,1,related posts,3,Related posts widget blogger,7,relationships,3,religion and government,4,religious garb,2,RFRA,1,rhetoric,1,Rich Snippets,1,Richard Spencer,1,Rick Lee,1,Ricky Gervais,1,Robert Heinlein,1,Robin Givhan,2,robots,2,Robots.txt,1,Roger Ailes,2,Roger Kimball,1,Rupert Murdoch,1,Russia,4,Ryan Gosling,1,Safe Browsing,1,Samsung,1,Sarah Huckabee Sanders,1,Sarah Vowell,1,Saudi Arabia,4,schedule social media posts,1,schedule social media posts app,1,schedule your social media posts,1,SCIENCE,2,science fiction,1,Scott Walker,1,sculpture,3,Sean Spicer,1,Search Engine Optimization tips,1,seen and unseen,1,Semantic Markup,1,SEO,43,SEO Backlinks,4,SEO Best Practices,1,SEO Contest 2012,1,SEO Olympics 2012,1,SEO Resources,1,SEO Services,2,SEO Specialist,2,seo tips,4,SEO Tool,1,Seth Rich,1,sexting,1,sexual harassment,1,signs,2,sitemap,2,slavery,1,slideshows,3,smiling,1,SMM,5,SNL,2,social buttons blogger,6,social media,10,social media plugins,4,spelling,1,Startups,1,statcounter,1,static pages,2,strange medical condition,1,stupid,2,suicide,1,sun,1,Supreme Court,1,surgery,1,survival,2,Talking Heads,1,technology,3,Templates,1,terrorism,7,Tesla,1,the Alt-Right,1,the Althouse comments community,1,The Future,1,The Lightning Seeds,1,the paradox of choice,1,The Simpsons,1,theater,1,these kids today,1,things,1,things are not what they seem,3,things not believed,1,things that won't work,1,Thomas Friedman,1,threaded comments,3,Tillerson,2,tiny house,1,Tips and Tricks,2,too many rules,1,tools,9,tools to schedule social media posts,1,travel,4,treason,1,trees,1,trolls,1,trucks,1,Trump and foreign policy,4,Trump and immigration,2,Trump and pop culture,4,Trump and religion,2,Trump and the law,1,Trump and the press,3,Trump derangement syndrome,5,Trump economics,2,Trump rhetoric,7,Trump scandals,2,Trump troubles,5,Trump's Congress,2,Trump's masculinity,1,Twitter,2,UK,1,unfair sentence,2,University of Wisconsin,1,unsaid things,1,urban planning,1,Vanessa Friedman,1,viral video,1,Volokh,1,WaPo,3,Wasserman Schultz,1,Web Programming,1,Website Design,2,Website Promotion,11,welfare,1,what Trump did to the GOP,2,whiteness,1,Widgets,48,wikileaks,2,Wikipedia,2,Wilbur Ross,1,Win iPhone 4S,1,Winston Churchill,1,Wisconsin,1,Witte,1,women's magazines,1,Woody Allen,1,WORDPRESS,6,WordPress Security,1,wrestling,1,writing,2,Yale,1,Yandex webmaster tools tutorials,1,Yelp,2,Young Althouse,1,
ltr
item
shoutdemy: How to add a thumbnail image/photo gallery in Blogger
How to add a thumbnail image/photo gallery in Blogger
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTMLNt53NFIxN8Gn4K1QrrlDJKGAIjTwZL7cIFIYFlJCbvcKWgkyJ9FpepKAG0p2xV45G50CCj8A_uDLVePknf3WVXgmo20oJuSVjGzEuZaM45-cTFMSV1Lqueup9jTPL6aOoislEY_e-/s1600/add-a-lightweight-image-gallery-to-blogger.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTMLNt53NFIxN8Gn4K1QrrlDJKGAIjTwZL7cIFIYFlJCbvcKWgkyJ9FpepKAG0p2xV45G50CCj8A_uDLVePknf3WVXgmo20oJuSVjGzEuZaM45-cTFMSV1Lqueup9jTPL6aOoislEY_e-/s72-c/add-a-lightweight-image-gallery-to-blogger.png
shoutdemy
https://shoutdemy.blogspot.com/2014/01/how-to-add-thumbnail-imagephoto-gallery.html
https://shoutdemy.blogspot.com/
https://shoutdemy.blogspot.com/
https://shoutdemy.blogspot.com/2014/01/how-to-add-thumbnail-imagephoto-gallery.html
true
9098016970842013807
UTF-8
Loaded All Posts Not found any posts VIEW ALL READ MORE Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy