How to move the search box to the right of the side in SharePoint Online

Andy 1,346 Reputation points
2022-02-25T06:38:26.447+00:00

I want to move the search box to the right of the side of the top of site in SharePoint Online, can anybody help me with it?

177736-20220225143422.png

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,677 questions
0 comments No comments
{count} votes

Accepted answer
  1. JoyZ 18,066 Reputation points
    2022-02-25T09:40:28.29+00:00

    @Andy ,

    To meet your requirement, check as following:

    Manually deploy SPFx Applications Customiser CSS Injection web part to your tenant first:

    ①Upload the react-application-injectcss.sppkg from the sharepoint folder to your App catalog.
    177826-image.png
    ②When prompted to deploy to all sites, choose the option that suits your needs.
    177835-image.png
    ③Then create a custom CSS file that meets your needs. For example, this CSS will move the search box to the right of the side.

    .o365cs-base ._8X8lWYtRJ2OY6mg2TEIbk{  
    left: 500px !important;  
    }  
    

    ④Upload the CSS file as custom.css to your Styles Library of the root site collection (i.e.: https://<yourtenant>.sharepoint.com/Style%20Library/Forms/AllItems.aspx).
    ⑤Navigate to your site. Your custom CSS should be applied.
    177758-image.png

    Note:

    To simplify deployment, the extension looks for a custom.css in your tenant's root Style Library. If you wish to use a different CSS name and location, refer to this:

    https://github.com/hugoabernier/react-application-injectcss#changing-the-css-location


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.