Small issue with CSS and margin, Firefox works, IE doesn't

Discussion in 'HTML & Website Design' started by Developer112, Dec 30, 2007.

  1. #1
    Hi,

    I'm glad to have finally found an active board for fellow Webmasters. I'm working on a Website for somebody I know, and there seems to be a small glitch in the CSS somewhere. There's a gap under the horizontal navigation and the title image in Internet Explorer. Firefox works fine.

    Here's a link:

    http://www.midlandglass.com

    Stylesheet link:

    http://www.midlandglass.com/style.css

    Thanks for your time!
     
    Developer112, Dec 30, 2007 IP
  2. tudungbawal

    tudungbawal Well-Known Member

    Messages:
    574
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    130
    #2
    From a short look from your html and css file. what i suggest you try first is removing the header div from the html and see what happen. What i see there is no content in the header div, so normally for firefox they will not consider the div exist or something like that. in other hand in ie they still consider the height of the header div.
     
    tudungbawal, Dec 30, 2007 IP
  3. spaceviewers

    spaceviewers Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First, remove the table height completely from the code for the header. If you need height, use cell height only. The solution won't be in css at all, except for assigning classes to the td's if you are planning that.

    Another option, is the header continues the table and flows into the body. So, one table, instead of the header being it's own table. I use this method quite a bit when I have 1 file that is the header.xxx and index.xxx That way, no matter what I do, the width always remains and doesn't go off in some odd direction; plus I can change the header anytime without worrying about the gaping hole.

    I get these same issues when i am working with some php scripts, not .html but it always comes back to the tables themselves and how it is coded. Firefox/IE errr. No uniformity. But FF is better anyways.
     
    spaceviewers, Dec 31, 2007 IP