Answered by:
Custom system master page issue

Question
-
I have a custom master page for my site that puts a banner image across the top of the site. In the Site Master Page Settings, I have specified that both the site master page and the system master page use this custom design.
The problem is when modal popups occur that are small. They have the banner across the top of them pretty much take up the entire height of the modal popup. If there is a scroll bar, at least the user can scroll down do gain access to the contents of the popup even if it is a horrible user experience. But in the cases there is no scroll bar, so there is no way to interact with the content in the modal popup at all.
Is there someway to change the size of the popup?
Tiny scollbar:
There are no mistakes; every result tells you something of value about what you are trying to accomplish.
Wednesday, January 31, 2018 7:47 PM
Answers
-
Hi,
We can add the code below into <head/> in the master page to hide the banner in the popup dialog.
<script type="text/javascript"> window.onload=function(){ var currentURL=window.location.href; if(currentURL.indexOf("IsDlg=1")>-1){ var banner = document.getElementById("banner"); banner.style.display="none"; } } </script>
Best Regards,
Dennis
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.- Marked as answer by run4it Monday, February 5, 2018 6:04 PM
Friday, February 2, 2018 8:46 AM
All replies
-
Hi,
Please move the banner div to the '<div id="s4-bodyContainer">' below.
Best Regards,
Dennis
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.Thursday, February 1, 2018 3:18 AM -
I tried your suggestion, however it did not put the banner at the VERY top of the page. It put it under the top navigation bar.
I have it here in my code in order to be at the top of the page:
There are no mistakes; every result tells you something of value about what you are trying to accomplish.
Thursday, February 1, 2018 9:44 PM -
Hi,
We can add the code below into <head/> in the master page to hide the banner in the popup dialog.
<script type="text/javascript"> window.onload=function(){ var currentURL=window.location.href; if(currentURL.indexOf("IsDlg=1")>-1){ var banner = document.getElementById("banner"); banner.style.display="none"; } } </script>
Best Regards,
Dennis
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.- Marked as answer by run4it Monday, February 5, 2018 6:04 PM
Friday, February 2, 2018 8:46 AM -
I think I figured out what my issue was with master pages not reflecting changed I make in Designer. I was editing the custommaster.html file in the subsite and not master page at /Applications/_catalogs/masterpage/ folder. So why is it then, that a copy of the master pages show up in the subsite in Designer? Am I safe to delete those so I don't keep making that same mistake? Regarding my initial issue of putting in a new banner, I am now editing the correct custommaster.html file. Then I go into the UI Design Master, and publish/approve the draft, then I go into Site Settings > Master Page and reset all subsites to inherit the master page setting. It is working.
Regarding the insertion of the javascript to remove the banner from modal popups, I have added that code and gone through the above process, but it's not working. I inspected the rendered source code in the web page and don't see the <script> that I added.
I believe I am putting it in the correct spot:
There are no mistakes; every result tells you something of value about what you are trying to accomplish.
- Proposed as answer by Dennis Guo Monday, February 5, 2018 7:52 AM
- Marked as answer by run4it Monday, February 5, 2018 6:03 PM
- Unmarked as answer by run4it Monday, February 5, 2018 6:03 PM
Friday, February 2, 2018 5:55 PM -
Hi,
Glad to hear that you figured out this issue, thanks for your sharing.
About the script above, please try to add script into .master file.
Best Regards,
Dennis
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.Monday, February 5, 2018 7:52 AM -
Dennis,
I figured out the issue. My issue was I didn't have id="banner" in my <div> tag.
Thank you for your help.
- Edited by run4it Monday, February 5, 2018 6:03 PM
Monday, February 5, 2018 5:23 PM