Styling SharePoint Blog Comments

Out of the box the comments on SharePoint blogs dont look that good. 

Standard SharePoint blog comments
Standard SharePoint blog comments

 Here is a way to fix that problem. Just add this CSS to the page and things should start looking alot better.

<style type="text/css">
/* wraps the title of each comment */
.ms-commenttable {border:0px;}
/* the title of each comment */
h4.ms-CommentTitle{font-size:x-small;border:0px;}
/* wraps the body of each comment */
div.ms-CommentBody {
	background:url('../../images/comm_top.gif') top 0px no-repeat;
	margin-bottom:12px;
	padding:18px 0 0 0;
}
/* wraps the text of each comment */
div.ms-CommentBody div {
	border:1px solid #ccc;
	border-top:0px;
	padding:15px;
	line-height:18px;
	}
/* wraps the meta info (author, date, etc.)	for each comment */
.ms-CommentFooter {
	background:url('/_layouts/images/square.gif') 5px 50% no-repeat;
	padding:3px;
	margin:0px;
	border-top:1px dotted #ccc;
	border-bottom:1px dotted #ccc;
}
.ms-CommentFooter span {padding-left:18px;}

/* wraps all comments */
.ms-commentsWrapper {
	background:#fff;
	margin:5px;
	border:0px;
}
/* header style for 'Comments' and 'Add a Comment' */
h3.ms-CommentHeader{
	padding-left:35px;
	background:url('/_layouts/images/menunewdiscussion.gif') top left no-repeat
}
</style>

Without editing the code of the page there are some limitations on what can be done. I did not make too many drastic changes but this code should be a good starting point for making your ShaerPoint blogs look better.

comments
Better looking comments

Here is the image I used in the CSS (right click save as). The other two images are referenced from the 12 hive and should work automatically on any WSS or MOSS installation. 

In a future post I will try to do something about the comment form.

davecavins

Dave is a SharePoint developer and graphic designer based in the DC area.

6 thoughts on “Styling SharePoint Blog Comments

  1. Hi,

    first of all: I love your Blog! I was looking for something like this for ages. Finally someone who’s looking into the styling of SharePoint. 🙂

    This works perfectly in Blogs that are not on My Sites, but all the personal Blogs obviously don’t pull the core.css. Do you know where I have to add your css in order to get this to work on My Sites Blogs?

    Thanks a lot
    Nicole

Leave a Reply

Your email address will not be published. Required fields are marked *