I'm sure you would have noticed the images that appear as a thumbnail on my blog have shadow effect. If not, hover your mouse over the image to the left. Interesting effect. Right? You can find this effect on blogs like Techiemania and other blogs run on WordPress Thesis Theme. Interested to have this effect on your blog?
I'm sure many webmasters would have installed this hack on their blogs long before but few newbies kept mailing me regarding this hack. So, to all those who asked for this hack, here it is. You may also consider reading this article if you wish to have captions on your images on hovering your mouse - Add Image Caption On Hover With CSS3. Let's get started with this tutorial - Image Hover Shadow Effect.
1. Navigate to "Design>>Edit HTML" and make a backup of your template by clicking on the "Download full template" link at the top of the page. Once the back up is over, search for the following piece of code.
]]></b:skin>
2. Place the following piece of code just above the line mentioned in step 1.
.imagedropshadow {
padding: 5px;
border: solid 1px #EFEFEF;
}
a:hover img.imagedropshadow {
border: solid 1px #CCC;
-moz-box-shadow: 1px 1px 5px #999;
-webkit-box-shadow: 1px 1px 5px #999;
box-shadow: 1px 1px 5px #999;
}
padding: 5px;
border: solid 1px #EFEFEF;
}
a:hover img.imagedropshadow {
border: solid 1px #CCC;
-moz-box-shadow: 1px 1px 5px #999;
-webkit-box-shadow: 1px 1px 5px #999;
box-shadow: 1px 1px 5px #999;
}
3. Save your template. Now, navigate to your post editor. To make this hack really working, you need to follow these steps.
1. Insert a picture in your post using the post editor.
2. Shift your tab from the Compose mode to Edit HTML mode.
3. Look for the img tag.
4. Place the following code just after the img tag with a space. Then, publish your post.
class="imagedropshadow"
If you find the above steps difficult to understand, then have a look at the following example. The final coding should be something like this.
<img border="0" class="imagedropshadow" height="75" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8WboZQt4K-6oilMsQu-q6KfBQ906ns9BpFFDNtvHVmVUuRKW_SnJ_QA3oB1Xx7MGznOv1Ouh2fzkHalo9S1Jxs5XM7fzM70lphPm5TL4kAyHsQXqUUmLRgM8j_fpkbUOtc4VW2qwFP1E/s200/CSSEditLogo1.jpg" width="75"/>
POSSIBLE CUSTOMIZATIONS:
You can change the color of the text shadows by changing the numbers highlighted in green on the code mentioned in step 2. Those numbers represent the HTML color codes. The following link may be useful in identifying the HTML color codes for you - HTML Color Names. The border thickness may also be varied by increasing from 1px(highlighted in orange) to the value you want. Even the color could be changed. I think it's pretty self-explanatory.
I hope you enjoyed this hack. If you have any difficulties in installing this hack on your blog, you can always reach me via email. Share your opinions via comments. See you soon with another interesting hack!!!