sharepoint母版页固定宽度与纵向滚动条靠右边

这个方法在添加list item时页面布局出现问题,因此,推荐使用修改版方法,在这里

 

 

之前的项目遇到sharepoint中要对页面的固定宽度。
所以总结下来,注意点,要在“s4-workspace”使用自带的css,才能达到效果,
<div ID="s4-workspace" class="s4-nosetwidth">


=================================================================================
详细例子如下:
页面固定宽度为 990px, 整体居中;

在html中加css:
<body scroll="no" onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master" style="width:990px;margin-left:auto;margin-right:auto;">

 

<div id="s4-workspace" class="s4-nosetwidth" >

 

from内容外:
<div style="width:990px;">
<asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"/>
<SharePoint:WarnOnUnsupportedBrowsers runat="server"/>
</div>

 

 


将纵向滚动条,移到浏览器的最右边,需在母版页加css
<style type="text/css">
body.v4master {
overflow: visible;
height: inherit;
width: inherit;
}
body #s4-workspace {
overflow: visible !important;
}
</style>

posted on 2012-03-09 10:05  向振文  阅读(629)  评论(0编辑  收藏  举报