RSS Dave on Twitter

Styling SharePoint Blog Comments

Posted: October 9th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: , , , | 3 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.

Bookmark and Share

Related posts:

  1. Styling SharePoint Blog Comments: Part 2
  2. Styling the MOSS horizontal navigation menu
  3. Adding Comments to a List Part 1
Share on Google Buzz

3 Comments on “Styling SharePoint Blog Comments”

  1. 1 Dave Cavins » Blog Archive » Styling SharePoint Blog Comments: Part 2 said at 7:00 am on October 16th, 2009:

    [...] As promised I went ahead and styled the comment form on a standard SharePoint blog.  I wanted to make it look better than this but there are some limitations because of the way the page is coded with so many nested tables.  [...]

  2. 2 Nicole said at 1:58 am on January 14th, 2010:

    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

  3. 3 davecavins said at 5:23 pm on January 14th, 2010:

    @Nicole On Mysite blogs you could put the code in a content editor web part, just set the content source to point to the css file.


Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes