Awaiting an answer SP Page Builder

custom css in style tab not working

Asked by Breda 3 years ago Last activity 3 years ago

HI,
I have a border applied to all images using the custom css on the template.
However I'm trying to use the custom style to change the colour of a border on 1 image.
I put it on an image and put the code into the style box but it does not pick it up:
http://prntscr.com/SqFAsB02306c
http://prntscr.com/5hkVtnmvlTso

I am trying to apply this style to the img bit it seems to be applying to the div:
<div class="sppb-addon sppb-addon-single-image whiteborder">
Thanks,
Breda

4 replies

Paul Frankowski Senior Staff
3 years ago · edited

Hi Breda,

but we are not CSS support nor w3schools.com. Anyway - basic examples how custom border can be used in Image addon:

.whiteborder img  {border: 2px solid red;}
.whiteborder .sppb-addon-single-image-container 
{border: 1px solid green;}
.sppb-addon.sppb-addon-single-image.whiteborder {
  border: 1px solid yellow;}
.sppb-addon-single-image.whiteborder img {
  border: 1px solid pink;}

color is just to show you differences.

Breda Asked this

Yes thaks I am not having a problem with the css code, my question on what the custom css style is applied to in SP Page builder. In this case I put the custom css on the style tab of an image element, but the style was applied to the div not the img.
I expected it to be applied to the img style.
Regards
Breda

Paul Frankowski Senior Staff
3 years ago · edited

Custom CSS Class in Image addon is for whole addon, by now we don't have class name for image (img) only.

Look up you got 4 examples how border can be used.

Breda Asked this

thank you,
Regards
Breda

Log in to reply.