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.

set widget background image

bubuprasadswain
Tera Guru

Hi All,

I am using custom homepage search widget cloning from OOB homepage search widget.

How to add background image for this particular widget.

find_real_file.png

Thanks in advance!!

Thanks & Regards,

Bubuprasad

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

You could put a div tag around with a class that defines the background image.



<div class="myBackground">


        // The rest of the HTML for the widget


</div>



CSS:


.myBackground {


        background-image : url("location_of_my_image");


}



CSS background-image property


View solution in original post

8 REPLIES 8

Chuck Tomasi
Tera Patron

You could put a div tag around with a class that defines the background image.



<div class="myBackground">


        // The rest of the HTML for the widget


</div>



CSS:


.myBackground {


        background-image : url("location_of_my_image");


}



CSS background-image property


Gaurav Bajaj
Mega Sage

Hi,



I think it can be achieved without code level changes as well.


Please go to the container containing the search widget, you will find the place to add it there.



find_real_file.png




find_real_file.png


I always like the "no code" approach better!



There's always something new to learn on the platform and that's why I love this community!


Haha,



Service Now community is the best community ever