Custom Css In Style Tab Not Working - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Custom Css In Style Tab Not Working

B

Breda

SP Page Builder 2 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

0
4 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #132401

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.

1
B
Breda
Accepted Answer
2 years ago #132404

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

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #132405

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.

0
B
Breda
Accepted Answer
2 years ago #132783

thank you, Regards Breda

0