Yet Another Firefox / IE related problem...

Discussion in 'HTML & Website Design' started by jon2k6, Jun 28, 2007.

  1. #1
    Just a small problem;

    http://www.derren-brown.net

    See, in IE the 'Navigation' is inline with the top of the sidebar and content like it should be and in FireFox it's slightly down abit...

    Anyone tell me the problem causing this?
     
    jon2k6, Jun 28, 2007 IP
  2. TonyStark

    TonyStark Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    avoid using <br> tags for spaces:

    <div id="header"><a href="http://www.drivingmadeeasy.co.uk"></a><br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    </div>

    In your css code use the height parameter instead:

    eg.. > #header {height:100px;}

    :) Cheers!
     
    TonyStark, Jun 28, 2007 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    Not tested.

    IE is incorrectly collapsing the margins, h1's into its container and h5 into its. Firefox is not. Simple fix, since both font sizes are the same, set {margin-top: 1em;} on both.

    And do delete all those <br />s.

    cheers,

    gary
     
    kk5st, Jun 28, 2007 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    Or padding... with CSS there's never a good reason to do stuff like:

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    Spacing with BR's or with &nbsp; is no longer needed, and is just a waste of code... same goes for the all to common spacer.gif
     
    deathshadow, Jun 29, 2007 IP
  5. jon2k6

    jon2k6 Guest

    Messages:
    602
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yeh, I do use padding. I use an external CSS file, the padding and margin set on both the sidebar and content are are the same, that's why it's puzzling me...
     
    jon2k6, Jun 29, 2007 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    To repeat myself, as I have nothing better to do, it's the h1 and h5's margins.

    gary
     
    kk5st, Jun 29, 2007 IP
  7. jon2k6

    jon2k6 Guest

    Messages:
    602
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ah yeh, cheers.
     
    jon2k6, Jun 29, 2007 IP