Major CSS problems in firefox, r.e <h2> tag

Discussion in 'CSS' started by rvdukc, Oct 16, 2008.

  1. #1
    All

    I'm having a big problem implementing a <h2> tag on my webpage, the current css code i have for the <h2> tag is:

    h2
    {
    {font-size: 14px;
    color: #000000;
    padding: 0px;
    margin: 0px;
    }

    I was previously having a large gap appear between the tag and text below, but adding the padding and margin code has rectified the issue in I.E (see here:)

    [​IMG]

    However in firefox:
    [​IMG]

    Is there something I should be adding to allow the h2 tag to be formatted correctly in both browsers?

    Any suggestions welcomed!
     
    rvdukc, Oct 16, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    h2
    {
    {font-size: 14px;
    color: #000000;
    padding: 0px;
    margin: 0px;
    }

    Should be:

    h2 { /*<<only one of these*/
    font-size: 14px;
    color: #000000;
    padding: 0px;
    margin: 0px;
    }
     
    wd_2k6, Oct 16, 2008 IP
  3. emzdesign

    emzdesign Peon

    Messages:
    538
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wd beat me to it. Yup, you have two open squiggles ( { ) in the h2 class.
     
    emzdesign, Oct 16, 2008 IP
  4. eric.r

    eric.r Peon

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just pointing out that if you attempted to just validate your css then this error would have been thrown at you. Just a suggestion but try validating your code to see if errors are causing your cross browser inconsistencies.

    ~eric
     
    eric.r, Feb 4, 2009 IP