[Resolved] Custom Page and Section Header Font Size and Color

Home Forums Support [Resolved] Custom Page and Section Header Font Size and Color

Home Forums Support Custom Page and Section Header Font Size and Color

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

    Hi,
    I would like to have a different font size and color for my H1 headings in Page Headers and Section Headers compared to what they are for a single blog post. I also need them to be responsive for mobile.

    Are you able to assist with how I do this as there doesn’t seem to be an option to tailor the font size in the header element or in the section.
    Thanks,
    Rachel

    #748241
    Leo
    Staff
    Customer Support

    Hi Rachel,

    You can do this in the HTML:
    <h1 class="page-header-h1">Page header title</h1>

    Then target it with CSS like this:

    h1.page-header-h1 {
        font-size: 20px;
    }
    @media (max-width: 768px) {
        h1.page-header-h1 {
            font-size: 20px;/*mobile size*/
        }
    }

    Then do the same with Section headers but with a different class name.

    Let me know if this makes sense 🙂

    #748327
    Rachel

    Ok thanks, got it working. I have around 100 lines of additional CSS now – is this an issue in terms of performance? THanks

    #748651
    David
    Staff
    Customer Support

    Hi there,

    100 lines will be fine, we suggest using a Child theme if the CSS starts running over 400 lines

    #749375
    Rachel

    Great, thanks!

    #749472
    David
    Staff
    Customer Support

    You’re welcome – glad we could help

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