Trouble change header tag with custom css

  • Unknown's avatar

    Hi I’m using the Yoko theme. I was able to make the changes I want with inline css on the home page. I would like to make the changes globablly using the custom css section.

    I used the following code in the custom css section with no affect:

    h1{
    line-height: 20px;
    font-weight: bold;
    margin-top: 5px;
    }

    Do anyone know what I’m doing wrong?

    I’m using the yoko theme.

    Thanks for reading.

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

  • Unknown's avatar

    Hi, generally h1 elements in a theme will have separate CSS selectors so that different sizes can be set for different purposes. Site titles will typically be much larger than post or page titles, and post and page titles may even have different styling.

    If you can let me know what exactly you are wanting to change, I would be more than happy to help with that.

  • Unknown's avatar

    Hello thanks for the response.

    I wanted to set the H1 headers as bold and with less space above and below them than the theme provides.

  • Unknown's avatar

    Thanks for clarification. First a couple things on header elements (h1-h6). Generally h1 is best used for only site title and page/post titles, and this is because the search engines place the highest emphasis on h1 and if we include h1 in the body of a post or page, then it can confuse things. What I would suggest is that we use a more specific CSS selector and then style h2 for use in content areas to what you are wanting. We can also modify the h3 and h4 to get you what you want for those, if you are going to be using those also. This would be the CSS selectors you would use for h2. You can use this as a guide for creating h3 and h4 changes in the content area.

    .wf-active #content h2 {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
    }

    Let me know your thoughts and if you have any problems or additional questions.

  • Unknown's avatar

    This is great! Thanks so much. Thanks for the tip about using H1 too.

  • Unknown's avatar

    You are welcome, and let me know how things go.

  • The topic ‘Trouble change header tag with custom css’ is closed to new replies.