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

I have custom master page .. it's everything ok in site pages , but when i open pop up dialog forms to add list item or theme my TopNavigationMenu is visible in dialog it.

How can i modify to hide or remove it from all dialog forms ?

share|improve this question
up vote 2 down vote accepted

add the CSS class 's4-notdlg' to your html elements that should not be visible when the page is displayed as a dialog

share|improve this answer
As this blog pointed out, you may also need to add runat = "server to your <html> tag. – ThatGuyYouKnow Mar 15 '12 at 16:06

Add s4-notdlg class to the div that you wish to hide in your master page.

  • s4-notdlg - This class when added with other classes in your master page, will eliminate that particular class from appearing in the modal dialog.
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.