In the current Modern Team Site template. It sets the max width of the 'canvas' to 1268px. This results in there be a large chunk of dead space on the right hand side of the page.

enter image description here

As there is no script editor web part for the modern site, how do I go about getting rid of this?

  • Are you using any custom CSS or script on this page? Also there is a modern script editor available developed using SPFx. – Ganesh Sanap Dec 19 '19 at 12:47
  • Hi @GaneshSanap, thanks for the quick response. There is nothing custom here, its all out of the box. I did read about a modern script editor built by someone else but I was hoping to keep my site as pure out of the box as possible. :) If I can't then I will grab the modern script editor and apply it. Thanks. – Gareth Doherty Dec 19 '19 at 15:07
  • I have not seen this much of blank space in any of the team sites we are using. Is there any other OOTB webpart which is not loading or nothing to show that's why it is showing blank? Check it bye editing your page. Is there a blank space on all pages of this site? – Ganesh Sanap Dec 19 '19 at 15:51
  • @GaneshSanap I just created another page, and again it has a large chunk of white space on the left, because of the max-width css property of 1268px. This is again an out of the box page template (visual) which I have used. imgur.com/q3HG1lY – Gareth Doherty Dec 19 '19 at 16:32

This is by design, we have to use custom code to achieve it.

We can use SPFx Applications Customiser to inject the following CSS style for the modern pages.

    max-width: none !important;

enter image description here

Solution with source code: SPFx Applications Customiser CSS Injection

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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