PDA

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


bobsmith1
05-21-2007, 05:04 PM
I have a table for my main content with two borders on each side. This table has a background image applied to give the effect of a shadow. Unfortunately, my table has a gap at the top and bottom (it does not fill the screen completely in the browser). How do I get rid of this gap?!

Andromeda
05-21-2007, 08:47 PM
Can you show us the code please?

bobsmith1
05-23-2007, 02:20 AM
thanks, here it is. hope u can help

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<table width="100%" border="0" mm:layoutgroup="true" height="100%">
<tr>
<td width="120" valign="top" height="896" bgcolor="#FFFFFF">&nbsp;</td>
<td width="656" valign="top" rowspan="2" bgcolor="#CCCCCC" background="file:///Macintosh HD/johanna edwards.com/midtable.gif">&nbsp;
</td>
<td width="115" valign="top">&nbsp;</td>
</tr>
<tr>
<td height="1"></td>
<td></td>
</tr>
<tr>
<td height="1"></td>
<td background="file:///Macintosh HD/johanna edwards.com/midtable.gif"><img height="1" width="656" src="file:///Macintosh HD/johanna edwards.com/spacer.gif"></td>
<td><img height="1" width="115" src="file:///Macintosh HD/johanna edwards.com/spacer.gif"></td>
</tr>
</table>
</body>
</html>

edbr
05-23-2007, 03:02 AM
whats this? mm:layoutgroup="true"

also <td width="120" valign="top" height="896" bgcolor="#FFFFFF">&nbsp;</td>
&nbsp;will give a space

bobsmith1
05-23-2007, 03:28 AM
Thanks, unfortunately that didn't take care of the problem (I removed the space as suggested and then also tried getting rid of the mm:layoutgroup="true" coding, but it looks exactly the same). Any more help is greatly appreciated!!

edbr
05-23-2007, 03:49 AM
try this first
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="891" border="0" cellpadding="10">
<tr>
<td width="115" >&nbsp;</td>
<td width="656" background="file:///Macintosh HD/johanna edwards.com/midtable.gif" bgcolor="#cccccc">&nbsp;</td>
<td width="120">&nbsp;</td>
</tr>
</table>
</body>
</html>
will give you a table with 3 columns

bobsmith1
05-23-2007, 04:05 AM
hi, thanks for the code, still looks like this though.....

http://i53.photobucket.com/albums/g75/hugoreynolds/dreamweaver.jpg

Andromeda
05-23-2007, 04:13 AM
try this:

<body bgcolor="#FFFFFF" text="#000000" topmargin="0" bottommargin="0">

The black part is your existing code - just add the red bit.

Andromeda
05-23-2007, 04:22 AM
Also, you've set your table to be 100% height of the screen BUT you've also given each of your 3 rows heights as well.
First row is 896px in height. The second and third rows are 1px each in height which gives a total of 898px height.

So on one hand you're saying your table is going to be 100% of the screen and on the other hand you're saying your table is going to be 898px.

What happens if the viewers monitor is for example 1024px is height?

There will be a conflict.

bobsmith1
05-23-2007, 04:26 AM
wow, that worked. what exactly did that do ? was it something I could have fixed in design mode ?

as you can see i'm still very basic at dreamweaver but you've helped me out. thank you

Andromeda
05-23-2007, 04:33 AM
You got rid of the automatic margin.

In design mode (I'm using DW8 ) go to your properties panel and select page properties as shown in picture. From there you can set the top margin as 0. There doesn't seem to be a bottom margin option so you may have to do that by code.

Hope this helps.