Text On Color Background - Question | JoomShaper

Text On Color Background

stq74

stq74

SP Page Builder 1 year ago

Hello, I created texts on a green background, with the first words in a larger font and on a black background. Example: https://elodiebalandras.com/reportages-dessines The problem is that depending on the browser, the black background exceeds the green background, I would like it to be aligned whatever the browser used.

Thank you

0
3 Answers
Pavel
Pavel
Accepted Answer
1 year ago #147872

Hi @stq74.

You cannot achieve this with the means that you are trying to do this. Inline elements do not support this. Only block or inline-block elements. You need to write your CSS for this.

Never use inline styles from text editor means for layout and design purposes.

Use both options - title and text.

Add your class to addon and write CSS code using this class

Code example (perhaps you need to adjust this code for your specific case)

.my-heading {
    background-color: green;
    color: white;
    padding: 10px 10px 3px;
}
.my-heading .sppb-addon-title {
    font-size: 1.9em;
    margin: -10px 10px 0 -10px;
    padding: 5px 10px 10px;
    background-color: black;
    float: left;
}
0
stq74
stq74
Accepted Answer
1 year ago #147944

Hi Pavel, it's ok, thank you very much.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 year ago #147846

Hi

Thanks for contacting us. Could you please explain your issue a bit more? Because it seems same on my end in every browser and every device. If possible give me a screencast video please.

-Regards.

0