Home Forums WoodMart support forum Problem with Additional CSS class and Custom CSS

Problem with Additional CSS class and Custom CSS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #618056

    n17kix
    Participant

    Hello,

    I have a problem with editing a “Text/HTML” element in my header.
    I want to edit(set font, change size, etc.) the text in the “Text/HTML” element by adding additional CSS class and then customizing it in the custom css. The text in the “Text/HTML” element is with “heading 1” tag.
    The name of the additional class name is “my-text-logo”. I manage to change the color only by using “!important”, but I cant change the size even with “!important”.
    I think that the changes I made are being overwritten. I also see that your theme uses its own properties to manage values(to change the color I use “–wd-title-color:red;”, not “color:red;”). If this is the case, and I am not wrong, I would want to know where I can find all the properties I should use in my custom css.

    I will be thankful for your answer. If you need more information I will be glad to help you.
    Thank you!

    • This topic was modified 1 month, 2 weeks ago by n17kix.
    Attachments:
    You must be logged in to view attached files.
    #618321

    Bogdan Donovan
    Keymaster

    Hi,

    Your custom code does not work because it applies styles to the Text/HTML element itself rather than to the <h1> tag inside it, which already has its own font-size styles by default. These styles won’t be overridden even if the wrapper has different font-size values, even with !important.

    To fix this, try updating the selector from .my-text-logo to .my-text-logo h1 to specifically target the <h1> tag inside my-text-logo for restyling. In this case, using !important will also no longer be necessary.

    Kind Regards

    #618373

    n17kix
    Participant

    Thank you! I understand it now and it works.

    Have a great day!

    #618374

    Bogdan Donovan
    Keymaster

    You are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)