setting table widths to 100%

liunx

Guest
Hi,<br />
<br />
With my html layout, I have a table with one cell along the top. I have set the width to 100%.<br />
<br />
So, in theory, the table should expand/contract according to whatever size the Browser window has been re-sized to. I want the table to not have any white space around it at all. <br />
<br />
A lot of websites do this.<br />
<br />
My problem is that when you click a link to another similar page, a 5 pixel white border appears at the right edge, and remains whatever size the window is. However, one click of the refresh button soon sets it straight.<br />
<br />
ps.this is done in dreamweaver 4, and viewed in explorer 6.<br />
<br />
So, what am I doing wrong, or is my PC going mental.<br />
<br />
This is an example = <!-- m --><a class="postlink" href="http://www.justride.co.uk/blue.htm">http://www.justride.co.uk/blue.htm</a><!-- m --><br />
<br />
thanks in advance<!--content-->ok for one a table won't go 100% if there is not data in it. NS is notorious for this<br />
<br />
it looked ok for me.<!--content-->looks fine to me in Opera.<br />
<br />
have you spanned the top row?<br />
<br />
<br />
<tr><br />
<td colspan="2" width="100%"></td><br />
</tr><br />
<br />
<br />
just set the colspan attribute to whatever number of columns you have<!--content-->nope, <br />
<br />
the colspan suggestion didn't work, and even with an image in the table, it still does the same thing.<br />
<br />
could it be something to do with my broswer, and nothing to do with html/dreamweaver?<br />
<br />
I will install netscape and see what happens<br />
<br />
thanks for the replies<!--content--><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">NN and IE do these differently. if i remember right (i probably didn't), NN does marginwidth/height, and IE does top/right/bottom/leftmargin. set a rightmargin.<br />
<br />
or... try CSS:<br />
<br />
<STYLE><br />
BODY<br />
{color:#000000;<br />
background:#FFFFFF;<br />
margin: 0px;}<br />
</STYLE><br />
</HEAD><br />
<BODY><br />
<br />
"color" refers to text color. note that doing this means you can now remove all attributes from the <body> tag.<!--content-->hi,<br />
<br />
tried the CSS, but to no avail.<br />
<br />
I dreamweaver 4 I set all the margins to 0, and it does give the desired effect, until I click a link. Refreshing gets it back to how I want it.<br />
<br />
Mustm be something really obvious that I must have missed.<br />
<br />
oh well, i'll keep trying:)<!--content-->when you click a link? did you change both blue and green pages?<!--content-->yes<!--content-->The same thing happens on my site, but it's not noticable unless you're really looking for it. I figured it had something to do with IE6.<!--content-->I really dont understand - the blue band goes right across the window.<br />
<br />
I have seen this in Opera and in IE5.5 now.<!--content-->Do you have empty cells?<br />
<br />
I.e.<br />
<td></td><br />
<br />
These will collapse in some browsers (NS particularly), therefore do this instead:<br />
<br />
<td><img src=http://www.htmlforums.com/archive/index.php/"spacer.gif" width="100%" alt="spacer" /></td><br />
<br />
Your spacer.gif should be a 1x1 pixel, transparent gif image.<!--content-->lazydave: did you add margins: 0px in the style sheet?<br />
<br />
becasue I added rightmargin="0" in the body tag and it fixed it. but those tags are deprecated and will no longer be supported. you can use what transmothra said<br />
<br />
<STYLE> <br />
BODY <br />
{color:#000000; <br />
background:#FFFFFF; <br />
margin: 0px 0px 0px 0px;} <br />
</STYLE> <br />
</HEAD> <br />
<BODY> <br />
<br />
but will only work in IE as NS4.xx doesn't recognise it.<!--content-->
 
Back
Top