Saturday, July 16, 2011

Post.aspx overflow in customized master page

We are using customized master page in our new SharePoint 2010 publishing website. After enabling the blog site template, we find the blog article display page: post.aspx has some display problem with our master page layout.



We're using fixed width in master page. However, the post.aspx always stretch over the fixed width and the horizontal scrollbar always shows up no matter how short the post content is.



After checking the page css heritance, we find the culprit is the empty comment style settings in the blog.css file.  We can find it in the following folder of 14 hive direcotry:

14\TEMPLATE\LAYOUTS\1033\STYLES



And here is the line we need to modify:

.ms-commentsempty

{

width:775px;

}



As we see, it has fixed width settings. We can change it to 100% if your customized master page mainContent div is small than this.

No comments:

Post a Comment