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.

How to write css for specific container??

Harshit10
Kilo Contributor

Suppose that i have 3 containers in my page and i have to apply page specific css for container 2.

So anyone can help me with  css code specifically for container 2.

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

Do below

Open page that you want to modify > Select container > add CSS class

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

View solution in original post

4 REPLIES 4

Mike Patel
Tera Sage

declare css class name on container and add css to page.

find_real_file.png

find_real_file.png

Shambhu5
Kilo Guru

Hi Harshit,

You will have to use CSS Class for this requirement along with some code as:

container{

background-color: <name of the color>

}

However, I have also tried to change CSS of a container through Edit Page Properties but what it does is, it changes all Containers color/properties (in identical manner) since it is applied for entire Page.

Another approach which I will suggest is, since you will be creating widgets for those containers, you can also provide appropriate <div> & <class> at the HTML side and use them in CSS-SCSS section for configuring/changing background-color.

Hope it helped!

Mark my answer as Correct/Helpful if that resolves your query.

Regards,
Vishrut
find_real_file.png

Mike Patel
Tera Sage

Do below

Open page that you want to modify > Select container > add CSS class

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

Thanks Mike this resolved my issue