Use Of % Instead Ox Pixels - Question | JoomShaper

Use Of % Instead Ox Pixels

H

H

SP Page Builder 10 months ago

When you make a responsive design, you often want to define the height or width of an element not in pixels, but as a percentage of the heigth/width of the parent element.

Is there a way to do this in SPPB? In the properties of most of the addons, you can only give in values in pixels.

Is there a way to deal with this? Besides using custom CSS?

0
5 Answers
Asfakur Rahman Saikat
Asfakur Rahman Saikat
Accepted Answer
Support Agent 10 months ago #184009

Hi there,

Thank you for your question.

You can use custom CSS to set the width or height in percentages by targeting the #addonId in the addon’s styles. For example:
Preview Screenshot

#addonId .sppb-example-class {
    width: 50%;
    height: 75vh;
}

Would you like assistance with a specific addon?

Feel free to ask if you have any further questions.

Best regards

0
H
H
Accepted Answer
10 months ago #184028

Hello Asfakur,

I know I can use custom css, bu I hoped there might be a better way.

E.g. in sections you can use percentages etc.

I would suggest that you add % , vh etc for all addons in a next release. Would make life much easier.

0
Asfakur Rahman Saikat
Asfakur Rahman Saikat
Accepted Answer
Support Agent 10 months ago #184032

Thank you for sharing your feedback. I will add your request as a feature suggestion, and hopefully, our development team will take it into consideration.

Could you please clarify which specific addon and property you are referring to? This will help us address your request more accurately.

Best regards

0
H
H
Accepted Answer
10 months ago #184040

I think everywhere where you can specify a heigth or width, and currently you can only give in a pixel value.

0
Asfakur Rahman Saikat
Asfakur Rahman Saikat
Accepted Answer
Support Agent 10 months ago #186429

Hi there,

Thank you for reaching out. I will submit a feature request for this.

Best regards

0