The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to Customize the Search Bar in Employee Center

boteeuwen
Tera Expert

Hello ServiceNow Community,

I'm currently working on customizing the Employee Center, and I would like to modify the search bar. Specifically, I'm looking to adjust the border radius and the size of the search bar.

Has anyone successfully done this or could you point me in the right direction for how to achieve this customization?

Any guidance or suggestions would be greatly appreciated!

Thank you in advance!

1 ACCEPTED SOLUTION

ChrisBurks
Giga Sage

One way to change the styling for the homepage search bar is to modify the widget instance CSS (Not the widget itself but the instance).

Follow the below steps.

With the page open, Ctrl + Right-click on the search bar and choose "Instance in Page Editor".

ChrisBurks_0-1741186487875.png

 

This opens the page editor with the instance of the widget already selected in the horizontal tree matrix.

ChrisBurks_1-1741186582966.png

 

Scroll down the page to the CSS section and find the Input and Button styling.

ChrisBurks_2-1741186690024.png

 

Make the appropriate modifications. Maybe something similar to the below screenshot where I made changes to the border styling and added styling for border-left and border-right respectively.

ChrisBurks_3-1741187067739.png

 

Result: You can see the border is much thicker and the line separating the magnifying icon and text is gone.

ChrisBurks_4-1741187190268.png

 

To control the size of the search bar find the "div" in the CSS styling and I would probably use a percentage or maybe just a max-width to keep the responsiveness.

Baseline:

ChrisBurks_5-1741187355778.png

 

Modified:

ChrisBurks_6-1741187481234.png

 

Result:

ChrisBurks_7-1741187512598.png

 

Hopefully that helps. Just make sure you are modifying the widget instance and not the widget itself.

 

 

 

 

 

 

View solution in original post

8 REPLIES 8

boteeuwen
Tera Expert

And I mean the Homepage search bar.

Ankur Bawiskar
Tera Patron
Tera Patron

@boteeuwen 

check this

How to change Homepage Search Widget (AI-Search) in CSS? 

Change Placeholder Text in Header Search Bar 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Both posts didn't help me

@boteeuwen 

did you check the widget and what changes did you apply?

what debugging did you perform?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader