in my custom master page the content doesn't fit into the page since a automatically generated table with the id=layoutsTable has width="100%". Since i have a fixed page layout there are some issues in the correct display.

Unfortunately this table is created automatically from the Control with id="PlaceHolderMain". I can't change this behaviour from the master-Layout neither in the .css-Page.

The parent div-container has the correct width but the table has this behaviour set instyle..

How can i change this instyle-Code or

2 Answers 2


Try the following CSS:

    width: inherit !important;

The !important flag usually works for me to even overwrite inline CSS styles.


You can use the class s4-nosetwidth to prevent SharePoint from taking over and injecting a variable width on the page. The best spot to do this is in the workspace div, but you can do it in other ones as well.

For example, you could just change this:

<div ID="s4-workspace">


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


Since the above solution is not applying directly to the generated table, you could always do this through javascript by adding this to your page:

<script type="text/javascript">

  function setLayoutsTableWidth() {
    var layoutsTable = document.getElementById('layoutsTable');
    layoutsTable.style.width = '200px';
  • i did this already.. but since the width is set instyle on this particular table the rule from the nosetwidth class is outruled..
    – Peter
    Mar 5, 2012 at 14:10
  • @Peter Sorry, I misunderstood. I've added a potential solution using javascript since you know the table's ID. Mar 5, 2012 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.