Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table width=100% not 100% in IE5.5 unless refresh-why?

Status
Not open for further replies.

pixelbro

Programmer
Sep 19, 2001
5
US
I've not been able to get a table to fill the entire screen when I set <table width=&quot;100%&quot;...>. The table almost fills the screen but stops 10 pixels from the right vertical scroll bar. Refreshing the screen or quickly resizing the screen corrects the problem. What's weird is I don't have this problem viewing other sites with 100% width tables.

I initially spotted the problem with a two column, one row table with the right column set at align=&quot;right&quot; ie, <td align=&quot;right&quot;...>. Decided to simplify and have just have a single row, single column table. With both <table width=&quot;100%&quot;...> and <td width=&quot;100%&quot;...> or with just <table width=&quot;100%&quot;...> nothing works, ie initial page loads 10-pixels shy of the right margin.

Any ideas?

g
 
That it works after refresh throws me a bit off, otherwise it might be the margin-settings of the body... This is not a bug - it's an undocumented feature...
;-)
 
Hi,

Can you please provide all of your code so i can try and replicate the problem

Cheers

 
For what it's worth here's the code. This is just a test, ie, the simplest, one-row, one-column table with background colors in body and table td to help spot if the table extends full distance or not. Thanks Jonax and JamesUniguy for your interest.

pixelbro

---

<html>
<head>
<title>clickgene</title>
</head>
<body bgcolor=&quot;#FFCC33&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; topmargin=&quot;0&quot; leftmargin=&quot;0&quot;>

<table width=&quot;100%&quot; height=&quot;100&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<tr>
<td bgcolor=&quot;#FF6600&quot;>&nbsp;</td>
</tr>
</table>

</body>
</html>
 
I have been fighting this for days myself. Figured it out, the obvious <body topmargin=&quot;0&quot; leftmargin=&quot;0&quot; rightmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;> DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top