Change font size of headers

  • Unknown's avatar

    Hi,

    I tried changing the font size of my headers in CSS (I’m using the Hermes theme) but with no results so far. This is strange as the color is updating, but not the size.

    The CSS code I used so far for example for my h1 title:

    h1 {
    font-size: 13px;
    color: #666666;
    }

    Thank you!
    Marion

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi Marion, I see you have used some inline styling within the post/page editor to get the sizes you want.

    The CSS selectors for the different headings (h1-h6) in Hermes are more specific, so for the h2, this would be the CSS needed to change the font size

    .single .entry-content h2, .page .entry-content h2, .comments-area .comment-body h2 {
        font-size: 2em;
    }

    Since you have added inline styling within the page/post itself though, this means we can’t override it with CSS, so to use the above, you would need to remove the style declarations from the h2 elements in the post/page editor.

  • Unknown's avatar

    Hi !

    Many thanks for this answer, it worked perfectly! The inline stying comes from the Blogger integration (we’re doing the migration to WordPress) so I’m currently removing all of it.

    Since we’re talking about CSS updates / titles / sizes / Hermes, I have another question: what should be the CSS if I want to update the size of the blog’s primary menu? Can I also center it in the middle so it’s aligned with our logo?

    Many thanks again!
    Marion

  • Unknown's avatar

    Hi, for the navigation font size, add the following and adjust as desired.

    #masthead .main-navigation a {
        font-size: 0.611em;
    }
  • Unknown's avatar

    Perfect thank you!

  • Unknown's avatar

    Hooray and you are welcome!

  • The topic ‘Change font size of headers’ is closed to new replies.