PDA

View Full Version : Unwanted top margin in FireFox



EricaStar
Apr 16th, 2009, 05:11 PM
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%;
}

Aitchy13
Apr 16th, 2009, 05:20 PM
Remove the bgcolor in your table


<html>
<head runat="server">
<title>Great American Advisors - Broker Dealer Services</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<table id="tblContainer" border="3">
<tr><td>hello</td> </tr>
</table>
</body>
</html>

EricaStar
Apr 16th, 2009, 05:39 PM
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.

VIPStephan
Apr 16th, 2009, 05:44 PM
Is that all of your code? Do you happen to have a link to the page?

EricaStar
Apr 16th, 2009, 05:55 PM
I figured it out. It turns out that all I had to do was to set the table's vertical align property to TOP.

abduraooft
Apr 16th, 2009, 06:38 PM
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 (http://www.hotdesign.com/seybold/)?

EricaStar
Apr 16th, 2009, 06:42 PM
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!

drhowarddrfine
Apr 16th, 2009, 06:48 PM
No, you have more problems than that. See the other thread. Firefox is performing correctly.