PDA

View Full Version : Table Gap,Table does not fill entire browser


PickleFace
02-24-2011, 10:26 PM
Hello there,

I'm trying to add a background image into a table but the code I have entered has displayed the background image then doesn't fill the gap at the top and bottom....

Heres my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title></title>

</head>

<body topmargin="0" bottommargin="0">

<table width="1366" height="500" border="0">
<tr>
<td width="1366" height="19" valign="top" background="Photoshop/Top-Border.jpg"></td>
</tr>
</table>

</body>
</html>



Hope you can help, this is driving me insane.

designer_282
02-24-2011, 10:48 PM
You should add some CSS to it. If you put this code in the head tag it should fix your problem:

<style type="text/css">
html, body {
margin: 0;
padding: 0;
height: 100%;
}
</style>

PickleFace
02-24-2011, 10:51 PM
Thanks for the advice but still doesn't work :/

designer_282
02-24-2011, 11:02 PM
Oh, I'm sorry. I had misread your problem. It actually sounds like there is some padding problems. Padding is the space between the border and picture. Forget what I said in my last post and try this.

Where you have <table width="1366" height="500" border="0"> try replacing it with this:

<table width="1366" height="500" border="0" cellpadding="0">

PickleFace
02-24-2011, 11:21 PM
Nice one man. Your a saver ;)

With <table width="1366" height="500" border="0" cellpadding="0"> it fixed the right hand gap but I put int cellspacing="0" as well then it fixed it all :)

Cheers man! :D