SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

since im doing a branding for my SP enterprise server which uses a fixed and centered layout i need to use the s4-nosetwidth class to adjust my width..

as you can see in the screenshot below this messes up my dialogboxes.. anyone ideas how the width from the class is not applied to dialog boxes?

s4-nosetwidth messes up my dialog-box

*small reso*/
@media screen and (max-width: 1123px)
        width:990px !important;
    .ms-dialog .s4-nosetwidth
        width:auto !important;
        overflow:hidden !important;
share|improve this question
Have you tried changing width: auto !important; to width: inherit !important; instead? I always use inherit instead of auto, as that uses the parent elements width, which usually aren't set to something specific when displayed in the dialog. – Daniel Ziga Apr 2 '12 at 11:55
tried this and it doesn't work either.. since some attributes are defined in the dlgframe.css i tried to change it there but wont work as well.. – Peter Apr 2 '12 at 13:35

you can add .ms-dialog then the css class that sets your width and change that width to auto. Sometimes it takes a bit of work around to get it just right. Basically use the .ms-dialog and reverse the width, or remove the background image or color, anything that messes up the dialog box.

Else I make sure I just use my custom master on the site master page and leave my system master page to use the v4.master.

share|improve this answer
it seems that this doesn't work for me propery.. i posted my custom css in my first post. the width of my workspace container is still adjusted after my s4-nosetwidth class.. – Peter Apr 2 '12 at 11:49
up vote 0 down vote accepted

i had a background applied to my workspace container which stretched the whole dialog-box. Now the background is applied to my s4-bodyContainer which basically fixed all my troubles.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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