i'm having a problem displaying my title. Possible IE, Firefox conflict.

Discussion in 'HTML & Website Design' started by jimsmith, May 26, 2006.

  1. #1
    My title and subtitle display fine in IE (picture 1), but seem to be shifted down a line or so in mozilla (picture 2)....

    [​IMG]

    In this second picture, I drew a green line under the subtitle (in white).
    [​IMG]

    Here's some relevant code....

    .top {
    width: auto;
    height: 98px;
    background-color: #06C;
    color: #fff;
    font-size: 36px;
    padding: 10px;
    }
    Code (markup):
    <div class="top">
      <p>Overruled.org</p>
      <p class="style1">Because there will be more laws tomorrow than there are today. </p>
    </div>
    Code (markup):
    I've been dealing with this problem for over 3 months now. I'm desperate for help. Thanks.
     
    jimsmith, May 26, 2006 IP
  2. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    You could try adding

    margin: 0;

    to your CSS.

    T
     
    Amsterdam, May 26, 2006 IP
  3. jimsmith

    jimsmith Peon

    Messages:
    629
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you meant this .....
    .top {
    width: auto;
    height: 98px;
    background-color: #06C;
    color: #fff;
    font-size: 36px;
    padding: 10px;
    [COLOR="Red"]margin: 0;[/COLOR]
    }
    Code (markup):
    I didn't notice any change...
     
    jimsmith, May 26, 2006 IP
  4. jimsmith

    jimsmith Peon

    Messages:
    629
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm still haven't figured this out... Help?
     
    jimsmith, May 30, 2006 IP
  5. mt.bum

    mt.bum Guest

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The problem is FireFox and IE create different paragraph heights. Not noticeable with smaller fonts sizes, at 36px it's causing trouble. You can test that by creating a page that has nothing on it but the following two paragraphs:

    <p style="font-size: 36px;">Overruled.org</p>
    <p style="font-size: 18px;">Because there will be more laws tomorrow than there are today.</p>

    Change the <p> tags to <div> tags and try it again. With <div> tags the line heights are the same in both browsers.
     
    mt.bum, May 31, 2006 IP
    jimsmith likes this.
  6. jimsmith

    jimsmith Peon

    Messages:
    629
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    awesome man..... awesome.
    you earned yourself a green.
     
    jimsmith, May 31, 2006 IP
  7. mt.bum

    mt.bum Guest

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No sweat. :cool:
     
    mt.bum, May 31, 2006 IP
  8. thelouisvilleseo

    thelouisvilleseo Peon

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Good job Bum; Jim... what I would do in the future if you can - learn to use DIVs and CSS fully - It will make a big difference.

    A trick I use in my CSS to keep things generally "clean":

    *html {
    margin: 0;
    padding: 0;
    }
     
    thelouisvilleseo, Jun 1, 2006 IP