Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #999219

    Hi.

    I’ve been following instructions from other peoples questions regarding this, but I just can’t seem to get it to work.

    I want to change the background color of one text block (not all), so I turned on “Show element options for developers” in the “Layout Builder”.

    Then I edited a text block on a page, and created a custom field named “textblock-black-background”.

    Then I created the following Custom CSS:

    .avia_textblock .textblock-black-background {
    background-color: black !important;
    }

    But the background color is not changing.

    What am I doing wrong?

    Regards
    Iain

    #999222

    these custom classes are not set in the custom fields. These custom classes are only setable if you are working with the advanced layout builder ( shortend as ALB).
    When you have your text-block element from Enfold ALB – open that element

    Under the inputfiled for the text there is now an input field for Custom Css Class

    #999225

    Yes, that is what I did.
    See https://imgur.com/a/gg9ylpL

    #999229

    And by the way – you do not need this to realize your project; On that ALB Textblock Element you have that settings dialog for text color. And on the surrounding column (1/1, 1/2, etc) you have a similar settings dialog for background-color:

    #999231

    There is no background colour for a text block, just font colour.

    View post on imgur.com

    #999233

    But that is OK.
    You gave me the answer by making me think about using a column and then placing the text block inside the column.

    #999235

    yes that is why i said the surrounding container.
    if you want to use it like a textmarker you can use your code – but you have to be carefull. If classes belong to one element they are not separated by a space! Just one after the other ( and order is also important to preserve) so your code:

    .avia_textblock.text-black-background {
        background-color: #000;
    }

    first try without important – the reason why i take the hex code is to save bytes ;) #000 ist shorter than black :lol

    #999240

    No worries.
    Thanks.

    #999247

    and by the way i mentioned that custom class input field because of your sentence:

    Then I edited a text block on a page, and created a custom field named “textblock-black-background”.

    #999256

    Hi spottydog63,

    Glad you got it working for you! :)

    Thanks to Guenni007 for your valuable input :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.