Anyone know how can I put the box in image in the navigation area without using SPFx just CSS only.

enter image description here

  • 1
    You cannot inject css in modern pages without spfx. Also, custom css/DOM manipulations are not recommended by Microsoft. Aug 4, 2022 at 2:47

3 Answers 3


You cannot inject custom CSS in modern pages without using SPFx.

You can use SPFx application customizer to inject the custom CSS in SharePoint online modern pages. Check more information at:

  1. How can I include the same JS and CSS files on multiple SharePoint Modern Page?

Note: DOM manipulation & CSS customizations are not recommended by Microsoft and some of your customization may break if Microsoft changes HTML element id/classes in new release updates.


As far as I know, custom css are not supported by sharepoint modern page any more. We can only use spfx to custom the modern page. Please refer to following document


As a wrokaround, You can deploy react-script-editor to your tenant so you could the webpart to this page, then you could add custom CSS/JavaScript to this page.


i already did it. I dont need spfx. i just copy the div and replace something on it

  • Can you explain the solution in detail? Are you doing this for single page or all pages? How you changed HTML on modern page, which webpart you used? Aug 8, 2022 at 4:03
  • i used modern editor Aug 10, 2022 at 4:59
  • ok, that is SPFx developed custom web part only. Glad you got it working. Aug 10, 2022 at 5:08
  • Glad that you found the solution to this problem. Thanks for your sharing. Aug 25, 2022 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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