How to resize the search box

shaik_irfan
Tera Guru

Hi,

 

On the Service portal homepage we wnat to reduce the length of the type ahead widget

 

find_real_file.png

 

Can anyone please help me how to do this ?

1 ACCEPTED SOLUTION

give a try

 

.input-group {
width: 90%;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);

}

View solution in original post

9 REPLIES 9

update the transform value 

 

transform: translate(-50%, -30%);

Hello, 

 

I am not seeing the .input-group. Is there another place to edit the width of this?

Priyanka Chandr
Mega Guru

Hi,

you can try this in your widget.

<div id="homepage-search" class="hidden-xs wrapper-xl">
<div class="wrapper-xl" style="margin-top:10px">
<h1 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="options.title"></h1>
<h4 ng-if="options.short_description" class="text-center m-b-lg sp-tagline-color" ng-bind="options.short_description"></h4>
<sp-widget widget="data.typeAheadSearch" />
</div>
</div>

 you can set margin-top as per requirement

 

Please mark it correct and helpful.

Thanks,

Rachel Gomez
Giga Expert

Steps are given below-

Right-click in any blank space in the task bar (or in the search box itself).

The active items have a check mark next to them—click the ones you don't want. You may have to repeat these steps for each one you want to remove/add. 

Next was the Search box.

 

Regards,

Rachel Gomez

BiancaK
Tera Expert

hover over the widget and click control - right click 

then select Instance in Page Editor 

BiancaK_0-1729196113818.png

Select your cloned Homepage Search widget

BiancaK_1-1729196179304.png

 

 

Scroll down to CSS field 

Add:

.hidden-xs{
width: 600px;
}

BiancaK_2-1729196224336.png

 

Save 

NB: Set the pixels as per your requirement and the widget should appear smaller

 

See this thread as well - it advised on how to adjust the height, but I tweaked the CSS to adjust the width: https://www.servicenow.com/community/now-platform-forum/reduce-the-height-of-homepage-search-widget/...