Forum Moderators: open

Message Too Old, No Replies

white space around table?

         

fukchai2000

1:17 am on Jan 28, 2005 (gmt 0)

10+ Year Member



hi guys....

i got this piece of code:

<body onLoad="changeBN()">

<table cellpadding="0" cellspacing="0" width="100%" border="0" bgcolor="#808080">
<td width="200" valign="middle"></td>
<td valign="middle"><a href="http://www.example.com/"><img id = "banner" ALT = "Alt Text" src="banner1.jpg" border="0" width="800" height="100" /></a></td>
</table>

</body>

when i run it.....there's a white space around the table..( the table is not completely at the windows border)....what i suppose to do to get rid of these white spaces?

[edited by: BlobFisk at 3:35 pm (utc) on Jan. 28, 2005]
[edit reason] Examplified URL in code. [/edit]

BonRouge

1:28 am on Jan 28, 2005 (gmt 0)

10+ Year Member



Try this :

css


body {margin:0; padding:0;}

Orbite

3:33 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



Supplementary hints:

White space around HTML objects is called margin.
White space inside an HTML container is called padding.

lammert

8:52 pm on Jan 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sometimes there stays one border pixel in between cells of tables. This can be annoying if you want neighboring cells to have the same background color. Use the following CSS style code for this:

table { border-collapse: collapse; }

fukchai2000

5:49 am on Jan 29, 2005 (gmt 0)

10+ Year Member



thanks a lot guys....that's a very helpful advise....i just started to learn about website...