Saturday, July 16, 2011

How to hide a specific div in SharePoint 2010 dialog

The class in styles "s4-notdlg"[means don't show in dialog not+dlg] is what we have to use to not show a specific division on SharePoint 2010 dialog.

For example, there is a banner in the header position of the master page and you do not want to show the banner in the dialog then the only simple option for you is using a simple css class to your banner div. If you add this class to your banner then when no dialog on the page no change to your implementation but when you are on dialog then the division with the class "s4-notdlg" will be forcibly applied to "display:none".

So, the moral of the story it is a good tactic that Microsoft SharePoint team developed to solve some major issues in design on dialogs.

No comments:

Post a Comment