Adding Image in Container using URL CSS Property

Sunpreetk
Tera Contributor

 

Hey guys help me out with one easy question - I have a container in the portal now that container definitely contains column. That container background colour is black i am thinking to add a small box picture in the extreme left & right of container using css but it is not showing me. 

Inside container there is 6:6 layout showing first column - image and second column content. I wrote css and defined property (url )to render image in container a small image to make background look nice but it is not rendering(servicenow portal)
1 ACCEPTED SOLUTION

Robert H
Mega Sage

Hello @Sunpreetk ,

 

This is an example of how to add a background image to a container:

 

In Page Designer, click the Page button to open the page properties, then put in some Page Specific CSS that defines a class:

.my-custom-background {
  background-color: #068236;
  background-image: url("/aes_no_results.svg");
  background-repeat: no-repeat;
}

 

Then go back to Page Designer, select the Container and open its properties. There enter the name of the CSS class you defined above.

RobertH_1-1745131816352.png

 

Result:

 

RobertH_2-1745131877875.png

Regards,

Robert

 

 

 

 

View solution in original post

4 REPLIES 4

Edxavier Robert
Mega Sage

Hi, can you post your CSS code? It will be more helpful to look at your code and see what is missing.

Thanks Ed, Its already resolved.

Robert H
Mega Sage

Hello @Sunpreetk ,

 

This is an example of how to add a background image to a container:

 

In Page Designer, click the Page button to open the page properties, then put in some Page Specific CSS that defines a class:

.my-custom-background {
  background-color: #068236;
  background-image: url("/aes_no_results.svg");
  background-repeat: no-repeat;
}

 

Then go back to Page Designer, select the Container and open its properties. There enter the name of the CSS class you defined above.

RobertH_1-1745131816352.png

 

Result:

 

RobertH_2-1745131877875.png

Regards,

Robert

 

 

 

 

hey Robert, Thanks for helping me but this is already resolved by me. The thing is adding css class in container did not worked for me but when i added the same class in the parent class field then it worked for me. But Thankyou so much for putting efforts.