New Landing How can we help? Themeforest Theme Support Dante CSS class for pagebuilder element automatically applies sitewide

Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Dante
  • #126658
    wattsh
    Member
    Post count: 38

    Hi, I’m fairly new to CSS and I can’t figure out my mistake here.

    I’m trying to apply a CSS class to a text block in page builder. I’ve created the class and added it successfully, but when I do, the class applies to “p” & “h2” sidewide (making nearly all my content white on white.)

    I’m wondering if maybe it’s the “!important;” I used? but if I don’t use it, it doesn’t apply to the element I’m trying to style.

    Any help diagnosing my problem would be appreciated, thank you.

    Here’s my CSS:

    .test h2, p{
    color: #ffffff!important;
    text-align:center;
    }

    .test h2 {
    font-size: 30px;
    }

    .test p {
    font-size: 16px;
    }

    #126659
    wattsh
    Member
    Post count: 38

    Note, if you’re looking at my site, I’ve temporarily changed the color #ffffff to #d2d2d2 just so I can see what’s going on with the text more easily & work on my site in the meantime.

    #126843
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Try this

    .test h2, .test p{
    color: #ffffff !important;
    text-align:center;
    }

    because .test h2, p will apply that style to .test h2 and on all p tags.

    Let us know,

    Thanks,
    laranz.

    #127115
    wattsh
    Member
    Post count: 38

    Thanks for this too laranz! Worked like a charm.

    Sorry for my ignorance, I knew it was something small I was missing in my code, I just didn’t know what!

    The help is much appreciated. ๐Ÿ™‚

    #127122
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Glad I helps. ๐Ÿ˜‰

    Let us know, if you have any other questions.

    Thanks,
    laranz.

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register