Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Portal Search widget move to center of the container

snowcone
Giga Guru

We increased the container size using page css. This is working fine.
.myHeight{
height: 550px
}

 

Now the search widget is tucked on the top - how can I move the search widget to the center of the container. Please see the image. TIA

1 ACCEPTED SOLUTION

adityahubli
Tera Contributor

Hello @snowcone ,

 You can also add css like following

 

display: flex;

justify-content : center ;

align-items : center ;

 

which will automatically brings your  content to the center of the container in which you are using the homesearch widget.

 

Mark it as correct and helpful if it helps you and solve your requirnment .

Regards,

Aditya

View solution in original post

4 REPLIES 4

Sarthak Kashyap
Mega Sage

Hi @snowcone ,

 

Please try with below CSS

position: relative;
top: 150px;

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak

Thank you Mega Sage for your reply.  I tried the following, it is removing my 550px. I want to keep the height: 550px and then center the widgets

.myHeight{
height: 550px
position: relative;
top: 150px
}

 

 

adityahubli
Tera Contributor

Hello @snowcone ,

 You can also add css like following

 

display: flex;

justify-content : center ;

align-items : center ;

 

which will automatically brings your  content to the center of the container in which you are using the homesearch widget.

 

Mark it as correct and helpful if it helps you and solve your requirnment .

Regards,

Aditya

snowcone
Giga Guru

This is the final CSS

.myHeight{
height: 850px;
position: relative;
top: 150px
}