WordPress.org

Ready to get started?Download WordPress

Forums

Coraline
Unable to create a new header style (7 posts)

  1. jlmarler
    Member
    Posted 1 year ago #

    I tried creating an entirely new element called <hn> with the specific characteristics I want. I tried adding a class to the h4 style. Neither approach works.

    This was my class attempt:

    h4.news {
    color: #322f80;
    font-size: 17px;
    font-weight: bold;
    }

    On the text page I used this code:
    <h4 class="news">heading goes here</h4>

    I'm confused because the definitions for headings are sort of distributed through the css. Maybe I'm not adding the class to the right instance of the heading. I will appreciate any help with this.

    Thank you!

    http://wordpress.org/extend/themes/coraline/

  2. Good Guy
    Member
    Posted 1 year ago #

    It should work +because you have got the right code. Can you post a link for us to see why it is not working.

    Generally, the class in the css can be defined like this:

    .news {
    	color: #322f80;
    	font-size: 30px;
    	font-weight: bold;
    }

    Now when you define your h4 as follows:

    <h4 class="news">heading goes here</h4>

    It should inherit the styles of class news.

    Good luck.

  3. jlmarler
    Member
    Posted 1 year ago #

    Hi. Thank you for the quick response. I'm glad to know that my code is correct, but I'm baffled as to why it isn't working.

    My website: http://jerilynmarler.com

    I define h4.news in the /* Headings */ section of styles.css.

    I have not applied the <h4 class="news"></h4> code pair on a published page because it isn't working yet.

    Thanks so much for your help.

    Jerilyn

  4. Good Guy
    Member
    Posted 1 year ago #

    I have not applied the <h4 class="news"></h4> code pair on a published page because it isn't working yet.

    If you don't apply it then clearly it won't work. How about creating a test page and see if it works.

    For css to work, there should be a correct html to go with that style. Just defining the style is not good enough if it is not used in the HTML.

    Please create a test page to show us why it isn't working.

    Thanks.

  5. jlmarler
    Member
    Posted 1 year ago #

    I have tried the code multiple times in multiple ways on draft pages. I meant that you would not find the <h4.news> tag on the LIVE site.

    Here's a published test page:
    http://jerilynmarler.com/heading-test/

    I have now applied the h4.news tag to two headings on this page:
    http://jerilynmarler.com/news/
    even though they are not yet displaying correctly.

    Thanks.

  6. Digital Raindrops
    Member
    Posted 1 year ago #

    The style is being over-ridden because the title is nested inside the class .entry-content so something like (Tested with FireBug Live Edit):

    .entry-content .news {
        color: #322F80;
        font-family: "Helvetica Neue",Arial,Helvetica,"Nimbus Sans L",sans-serif;
        font-size: 30px;
        font-weight: bold;
        text-rendering: optimizelegibility;
    }

    HTH

    David

  7. jlmarler
    Member
    Posted 1 year ago #

    David, that solved the problem! Thank you, thank you for your time and help. You rock!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags