Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #745493

    Hi,

    Whilst working on a new website I can’t seem to get the custom styling of my headings right. Normally this would do the trick:
    In the text:
    <h2 class="titlefrontpage">some headingtext</h2>

    The CSS:
    .titlefrontpage h2{font-size:20px!important; text-transform: none!important; margin-top:10px!important; color:#473c8e!important}

    Tried the option of adding class to the text element itself but no luck either.
    What am I doing wrong here?

    Thanks in advance!

    Regards,

    Steven

    #745541

    Hey steviger,

    instead use:

    h2.titlefrontpage {
    
    }

    Best regards,
    Andy

    #746808

    Hi Andy,

    Thanks for your response. Forgot to mention that I already tried this one ( and h2 .titlefrontpage also) without any luck.
    Even more strange:
    This doesn’t work:

    .titlefrontpage {font-size:18px!important; text-transform: none!important; margin-top:10px!important; margin-bottom:0!important; color:#473c8e!important}

    But this combination does:

    h2.titlefrontpage {}
    .titlefrontpage {font-size:18px!important; text-transform: none!important; margin-top:10px!important; margin-bottom:0!important; color:#473c8e!important}

    Regards,

    Steven

    • This reply was modified 7 years, 11 months ago by steviger.
    #747302

    Hi Steven,

    Thanks for the feedback. So I’m guessing you got it working?

    Best regards,
    Rikard

    #747428

    Hi Rikard,

    Well, yes this combination does work but it’s not the normal/proper way of CSS markup is it?

    Anyway, thanks for the support!

    Cheers,

    Steven

    #747804

    Hi Steven,

    Thanks for the feedback. I’m not sure if there is a normal or proper way to write CSS to be honest with you, if it works it works :-)

    Best regards,
    Rikard

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