Problem with two <h2> Classes

Discussion in 'CSS' started by lostdog, Sep 2, 2010.

  1. #1
    Hi,

    I am trying to add a <h2 class="h2inspection"> to all my State pages. Problem is when I add the h2inspection class the font size is large as in the normal <h2> tag. The h2inspection class is not currently up. I can place it just let me know if you need this for problem shooting.

    Any advice will be greatly appreciated.

    Here is the class:

    .h2inspection {
    color: #0b3571;
    font-size: 1.4em;
    font-weight: bold;
    }

    Link to my css: http://www.americanhomeinspectordirectory.com/templates/Professional/style

    Sample State page: http://www.americanhomeinspectordirectory.com/home-inspectors/virginia/
     
    lostdog, Sep 2, 2010 IP
  2. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #2
    you used pixel, point and em value for fonts, so everything is messed up a bit.

    Try to use only em for example.
     
    Piotr Aszoff, Sep 2, 2010 IP
  3. lostdog

    lostdog Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Piotr,

    Made both pt still not showing properly.
     
    lostdog, Sep 2, 2010 IP
  4. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #4
    Ok, size of fonts is 16pixels(1em) by default.
    You have set 11pixels for all the site.
    So your 1em is 11pixels. Writing 1.4em means for you about 15pixels (its not taken from h2 tag but from the main size(defined for body) - 11pixels in your case).
    12pt for your standard h2 is nearly the same as 1.4 em.

    If you want to, use 17pt for .h2inspection class or try to use em values for h2 also.
     
    Piotr Aszoff, Sep 3, 2010 IP