Forum Discussion
bbsin
Oct 12, 2020Iron Contributor
SharePoint Online layout - Pls help to fix it...
Hi Can SharePoint developer fix the following problem I am trying to create a site on SharePoint online, I notice that when I insert a image as header and then input text at the bottom, there...
Oct 12, 2020
bbsin Hello,
Here is the code (simplified), to solve this:
document.getElementsByClassName("ControlZone")[1].style.marginTop = "0px"
NOTE!
- This requires maintenance due to Microsoft possibly changing the class name of the elements that are targeted.
- "[1]" refers as the second element placed on the page (this could differ for you, but a developer can find it easily).
- You would need to implement the SPFx React Script Editor Web Part from PnP, see link below:
https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-script-editor
Yours sincerely,
Aref Halmstrand