none
Reducing the height of banner image in SharePoint Online Modern Page RRS feed

  • Question


  • Hi

    In one of my  SharePoint online modern page, there is a banner image set( back-ground image). Is there any way to reduce its the height. Using a script editor webpart developed using spfx I tried to reduce the height by this way https://sharepoint.stackexchange.com/questions/255268/how-to-resize-homepage-banner-image. But as the page load happens first and then only the height is getting reduced. This is causing a flickering. Is it any way to solve this issue? 

    Regards,

    Rahul.

    Thursday, November 7, 2019 9:25 AM

All replies

  • Hey

    You can add a script editor webpart to the page and using css to change the height.

    https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor


    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Learn Microsoft 365 from Microsoft DOCs now!
    Please Vote and Mark as Answer if it helps you.

    Friday, November 8, 2019 1:36 AM
  • Hi Justin

    Thank you for your reply. But as I have mentioned in my post it is not helping me as loading of image take place first and then resizing its height. Hence a flickering happens.Other than this any clues?

    Regards

    Rahul.

    Wednesday, November 13, 2019 12:23 PM
  • Er... I am not sure.

    Who set the back-ground image property?

    I understand your issue, that page will load the background first with a initialized size value.

    If you use css to modify the size, it will get a flickering. Then how about set the background to the right size when you load it?


    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Learn Microsoft 365 from Microsoft DOCs now!
    Please Vote and Mark as Answer if it helps you.

    Thursday, November 14, 2019 1:22 AM