Highlight author Comment in blogger

by Nandupatel on January 4, 2009

1. Login to blogger, then choose Layout >> Edit HTML. Don’t forget to backup your template first.
2. Check the “Expand Widget Templates” box.
3. Copy this script and put it before ]]></b:skin>

.comment-body-author {
background: #E6E6E6; /* Background color*/
color: #000; /* Text color*/
border-top: 1px dotted #223344;border-bottom: 1px dotted #223344;border-left: 1px dotted #223344;border-right: 1px dotted #223344;
margin:0;
padding:0 0 0 20px; /* Posotion*/
}

4. Then find this code:

<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<a expr:name='"comment-" + data:comment.id'/>

<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
said...
</dt>

<b:if cond='data:comment.author == data:post.author'>
<dd class='comment-body-author'>
<p><data:comment.body/></p>
</dd>

<b:else/>

<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>

</b:if>

<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>

5. The blue color text is the code that you have to copy and paste. The position must be right.

6. Save your template.

{ 6 comments… read them below or add one }

Blogspot Template May 13, 2009 at 9:19 pm

useful article…thanks and keep share

Reply

sandip November 7, 2009 at 12:41 pm

thanks for share !!

Reply

Blogger Plug n Play November 19, 2009 at 8:13 am

Thanks a lot :)
.-= Blogger Plug n Play´s last blog ..Message Box Like Wordpress With Close Button Using jQuery For Blogger Blogs =-.

Reply

Samsul April 14, 2010 at 7:59 am

thanks, I’ve done it on my blog and did a few changes :-)

Reply

M'dame Jo January 11, 2011 at 7:50 am

Your explanations are really clear, yet I still can’t get it to work. I’ve tried with yours and all others tricks I could find, following the instructions religiously, but nothing. This is frustrating… and I may give up pretty soon :)

Reply

M'dame Jo January 11, 2011 at 7:56 am

I’ve found another suggestion here http://www.google.com/support/forum/p/blogger/thread?tid=1402f68525bc7f36&hl=en

Dashboard – Design – Template Designer – Advanced – Add CSS – paste the following code – Apply to Blog:

.comment-author.blog-author a{
color: yellow !important;
text-decoration: blink; /*other options: underline, overline, line-through, none*/
background: red;
font-size: 1em; /*increase the value 1 to increase font size*/
font-weight: 800; /*choices: 100, 200, 300, 400(default), 500, 600, 700(bold), 800, 900*/
}

And it worked for me. Thanks anyway.

Reply

Leave a Comment

Previous post:

Next post: