Web Analytics Made Easy -
StatCounter Unwanted top margin in FireFox - CodingForum

Announcement

Collapse
No announcement yet.

Unwanted top margin in FireFox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unwanted top margin in FireFox

    Can someone tell me why Firefox displays a space at the top of my design, although I have all margins reset to 0?

    HTML:

    <html>
    <head runat="server">

    <link rel="stylesheet" type="text/css" href="css/main.css">
    </head>
    <body>
    <table id="tblContainer" border="3" bgcolor="white">
    <tr><td>hello</td> </tr>
    </table>
    </body>
    </html>

    CSS:

    body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
    margin:0px;
    padding:0px;
    background-color:#000947;
    min-height:100%;
    }

    table {
    border:0px;
    margin:0px !important;
    padding:0px;
    empty-cells:show;
    border-collapse:collapse;
    border-spacing:0px;
    table-layout:fixed;
    display:inline-block;
    font-size:1px !important;
    }

    #tblContainer
    {
    width:100%;
    min-height:100%;
    }
    Last edited by EricaStar; Apr 16, 2009, 11:34 AM.
    Did I help? If yes, Nominate me!

  • #2
    Remove the bgcolor in your table
    Code:
    <html>
    <head runat="server">
    <title>Great American Advisors - Broker Dealer Services</title>
    <link rel="stylesheet" type="text/css" href="css/main.css">
    </head>
    <body>
    [COLOR="Red"]<table id="tblContainer" border="3">[/COLOR]
    <tr><td>hello</td> </tr>
    </table>
    </body>
    </html>
    --> Check me out <--

    Comment


    • #3
      Ooops...I didn't realize that was still in there. I removed it. It's some sort of compatibility issue. It works fine in IE. Setting Line-Height to 16px fixes the problem, but if I do that, I'm just going to run into other issues later with IE. Any other suggestions would be greatly appreciated.
      Did I help? If yes, Nominate me!

      Comment


      • #4
        Is that all of your code? Do you happen to have a link to the page?
        Stop solving problems you don’t yet have!

        Comment


        • #5
          I figured it out. It turns out that all I had to do was to set the table's vertical align property to TOP.
          Did I help? If yes, Nominate me!

          Comment


          • #6
            Originally posted by EricaStar View Post
            I figured it out. It turns out that all I had to do was to set the table's vertical align property to TOP.
            Do you know why tables for layout is stupid?
            Digitalocean Cloud Hosting (Referral link - get $10 free credit) Fameco

            Comment


            • #7
              You don't have to waste your time telling me why. I already know why some people think that using DIVS are better. I wouldn't use stupid either. That implies something different. Happy Coding!
              Did I help? If yes, Nominate me!

              Comment


              • #8
                No, you have more problems than that. See the other thread. Firefox is performing correctly.
                Is IE9 a modern browser?
                IE9 is at least 2 years behind the modern web.

                Comment

                Working...
                X