Showing the profile image in blogger comments is being popular now a day. But, it comes to have many problems based on CSS code. Many of them are searching for good CSS based codes. As I have got some problem like there is no extra place for profile image avatars. Look at the below screenshot.
Playing with CSS and having some fun I have a trick for that. Now, look at this solved problem.
Now how to do it.
First of all Go to Blogger > Settings > Comments and enable “Show profile images on comment” as before.
In your blogger's Edit Html section search for the following code in CSS area.
#comments-block
Search only #comments-block for easy (Press Ctrl+F). Now you have to customize that CSS. Change the width 580px to 545px (The width must have different according to your template) and float: left; to float: right; or you can change it's width according to your template.
width: 580px;
float: left;
padding: 0;
margin: 0;
Now go to Blogger Layout >Edit HTML and backup your template. Don't forget to check "Expand widget templates". And find the following code:
<dl id='comments-block'>
Or if you haven't find the above code, try to find this:
<div id='comments-block'>
And finally you found it? Ok then replace it with this.
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
Now again find this line in code: ( You can find this code easily press Ctrl+F)
<a expr:name='data:comment.anchorName'/>
And replace it with below codes.
<b:if cond='data:comment.favicon'>
<img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
</b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<div expr:class='data:comment.avatarContainerClass'>
<data:comment.authorAvatarImage/>
</div>
</b:if>
Now Just Go to blogger edit/Html and find for ]]></b:skin> tag and place the below css codes before it.
/* Avatar */
Of course you can just edit the image link, height and width in above css codes as you like.
.avatar-image-container img {
background:url(http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=35);
width:35px;
height:35px;
}
And save the template, you are Done! :) Look at my comments how it looks as better than before.
I hope your problem is solved like mine. If you have still some problem leave your comment I will try to solve it. Feel free to ask questions.
Labels: Blog, Blogging, Cool tricks, Tips n Tricks






Hi, this is a test comment to show how it looks like.
ReplyDeleteThanks for the blogspot updates.. i m exploring blogger blogs these days to help my frnds.. This is useful..
ReplyDeleteHey, you are good in blogger hacks!
ReplyDeleteThanks Fazreen:)
ReplyDeleteThanks for the sharing this website. it is very useful professional knowledge. Great idea you know about company background.
ReplyDeleteweb application development
Hello,
ReplyDeleteI can't get the profile images to show up in the first place- I've tried hacks all over the web and no luck- profile images are enabled- and then I've tried to insert the code and nothing. The hack worked on my test blog, but I can't get it to work on my real blog. They are almost identical, but my real blog was created a while before my test blog. I hope you can help :)
@Tessa
ReplyDeleteMake sure you have find exact code and you have replace it with exact code. You don't need to use hacks in default template. One of the thing you have to embed is: go to Settings->Comments->Check 'YES' to "Show profile images on comments?".
Can I see your blog which you have try to embed comment avatar? and i will see what's the real problem.
thanks a lot !
ReplyDeletedid it with your help!
Please suggest how to separate comments in a bubble or box .
ReplyDeleteI can see comments in a gray coloured box on your page.
Thanks.
regards
@Alpana
ReplyDeleteI will post about that 'How to separate comments in a box or outline. Just be passion ;)
good
ReplyDelete