Text only background color

Hello! How to make background color for the text only?

Hi There,

In the version 2 of text element, you can change the background color of the text.

It’s under Set Up > Background:

Please ensure you have turned on the Advanced Mode under X > Settings > User Preferences > Advanced Mode > Always On:

Hope it helps :slight_smile:

Thank you! But not only the text is highlighted. How to make background for text only. Is the secret in the size settings?

Hello Konstantin,

A way to do it would be to wrap the text in the text element in a span tag like:

<span>O .....</span>

Then add this code in the text element’s Element CSS:


$el span {
    background-color: red;
    display: inline-block;
}

Please set the background setting of the text element to white or transparent.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.