Forum Moderators: open

Message Too Old, No Replies

Table not going to the edges in Firefox

         

sillymonkeywhocares

7:25 pm on Dec 23, 2006 (gmt 0)

10+ Year Member



This seems like it should be so simple, but I just can't figure it out.

I want the black bar to go completely to the side and top edges of the page, with no white around the edges. It looks fine in IE, but in Firefox, there's white around the edges of the black line. What can I do to fix it? Thanks.

<BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0">

<CENTER>
<table WIDTH="100%" BGCOLOR="#000000" CELLSPACING="0" CELLPADDING="0">
<tr>
<td ALIGN="center">
<font face="arial" size="4" color="#FFCCCC">
Blah, blah, blah, yada, yada, yada...
</font>
</td>
</tr>
</table>
</CENTER>

</BODY>

mattcg

12:34 pm on Dec 25, 2006 (gmt 0)

10+ Year Member



I don't think Firefox supports topmargin, leftmargin, etc. I normally use css for this:

body {
margin:0;
}

Edit: I just noticed a similar question has already been answered here [webmasterworld.com].

sillymonkeywhocares

7:03 pm on Dec 26, 2006 (gmt 0)

10+ Year Member



Thank you. Where exactly would I put that code? I know nothing about css. I tried putting it where I thought it might go, but the code actually showed up on the page when I viewed it. :)

sillymonkeywhocares

7:07 pm on Dec 26, 2006 (gmt 0)

10+ Year Member



Never mind. I figured out where it goes. It worked perfectly. Thank you.

cmarshall

7:58 pm on Dec 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just as an aside. This isn't a bad idea:

html {
margin: 0;
padding: 0;
}

I think this will do the same thing:

* {
margin: 0;
padding: 0;
}

tedster

12:29 am on Dec 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use that approach as SOP for every site I build now. It avoids cross-browser differences in default padding and margins -- no more nasty surprises!