Medium Feed


Sunday, May 17, 2015

Creating center positioned Master Page layout using CSS in SharePoint 2013

If we want to create a master page layout with all the contents or layouts center aligned . The simplest CSS trick which we can do is below:

Just add the below CSS in the your CSS file:

#s4-bodyContainer {padding-bottom: 0 !important; margin-left: 50px;
    margin-right: 50px; }
 body #s4-mainarea,
     margin: 50px;
     padding: 0px;
     float: none;
     background-image: none;
     background-color: white;

Also change the "s4-workspace" div like below:

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


That is it ..  You are done !!!. :-)