Aweber - Email Marketing Made Easy
Add a Fancy Drop Shadow to Your Comment Avatars

Add a Fancy Drop Shadow to Your Comment Avatars

February 18, 2012 · 10 comments

in Thesis

Thesis 1.x Notice: Thanks for reading this post! So, here's the deal. I wanted you to be aware that this post was written prior to the release of Thesis 2. So that means the instructions or other information provided applies specifically to Thesis 1.x and not the latest 2.x version. Thanks!

A reader of this blog posted a comment asking me to share the code that I’m using for the comment gravatar images. I’ve provided the code below, but keep in mind that you can always use Firebug to look at the CSS code used on elements of a website. I’m not saying you should copy code from other sites, but you can certainly get ideas and learn from other web developers as to how they achieve certain effects.

It’s really just CSS that was used to achieve the border and drop shadow effect, along with an image I had to create.

Now, you can certainly recreate that shadow effect using only CSS and that’s also an option for you. Here are two links to tutorials on that:

Here’s my simple CSS code that I used for the avatar images on this site. Just add this to your custom.css file.

.custom span.avatar {
   background: url(images/shadow.png) no-repeat center bottom;
   float: right;
   height: 103px;
   margin-left: 10px;
   width: 86px;
}

.custom .avatar img {
    background: #FFFFFF;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #DDDDDD;
    padding: 5px;
}

Here is a link to the image file I used. If your avatar image on your site is not the same size then the shadow won’t work and you’ll need to create a new one, or you can just try out one of the CSS solutions I provided above. You can always adjust the avatar image size too.

Of course, you aren’t limited to this styling. You can get creative and style the comment gravatar images any way you want with CSS.

Was this post helpful? Consider subscribing to my blog via RSS or

This Site Runs on the Thesis WordPress Theme

Thesis Theme thumbnail

If you're someone who doesn't understand a lot of PHP, HTML, or CSS, Thesis will give you a ton of functionality without having to alter any code. For the advanced user, Thesis has incredible customization possibilities via extensive hooks and filters. And with so many design options, you can use the template over and over and never have it look like the same site.

If you're more familiar with how websites work, you can use the fantastic Thesis User's Guide and world-class support forums to make more professional customizations than you ever thought possible. The theme is not only highly customizable, but it allows me to build sites with a much more targeted focus on monetization than ever before. You can find out more about Thesis below:

{ 10 comments… read them below or add one }

Amandeep Singh February 19, 2012 at 2:48 am

Thanks a lot once again mate… I actually used FireBug to have an idea of what you have implemented but I was doing something wrong which I realised now… and now it worked :)

Cheers!!
Amandeep Singh recently posted..Top 5 Android Facebook Apps for 2012

Reply

George Serradinho February 19, 2012 at 6:14 am

Very nice and easy to implement, thanks for sharing this easy custom styling.

How would you do the same for the top? I want to add it to the top and bottom as well. I will flip the image for the top piece.
George Serradinho recently posted..SEO And/Or PPC – What will it be?

Reply

Thesis-Blogs.com February 19, 2012 at 10:34 am

You could create a single image with both a top and bottom shadow and the use that as the background image. You may need to adjust some of the values in the css, like perhaps the height of the avatar span.

Another way would be to use multiple backgrounds with css, although most version of IE don’t support that.

Reply

Abdulsalam March 21, 2012 at 4:14 am

Sir i need your help i just stylified my blog but it needs customization the shadow below the avatar is creating problems and the text “{ 3 comments… read them below or add one }” is appearing black in my site and unable to view easily! Please help or just come to live chat with me please

Reply

Thesis-Blogs.com March 21, 2012 at 5:02 am

Your site sure looks familiar. I see you copied some design elements from this site. As to the avatars, you need to increase the size of the avatar so the shadow image fits. Also with regard to the comments intro section, just change the color of the anchor tags to white in the css file.

Reply

Abdulsalam March 22, 2012 at 8:57 pm

I am seeking your help just because i cannot do exactly and cannot find the relative css codes! Can you please guide me

Reply

Tu Nguyen March 27, 2012 at 12:17 am

I don’t use thesis but thanks for the code and the image.
Tu Nguyen recently posted..Consistency Is The Key To Your Blogging Success

Reply

Ammar Ali April 18, 2012 at 1:30 am

I have added it seems to adjust some margins and paddings to make it work perfectly :)
Ammar Ali recently posted..Top 3 Theme Frameworks For WordPress

Reply

Katie April 23, 2012 at 5:40 am

Great! Thanks for sharing this! I’ll try it… Hehehe
Katie recently posted..Family Lawyer

Reply

Sovo August 29, 2012 at 3:22 am

Leave a Comment

When commenting, you can use basic HTML tags. If you are pasting in any code, please escape it here and then include that code within <pre></pre> tags. Thanks!

CommentLuv badge

Previous post:

Next post: