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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

100% table not filling screen? 2

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
Iv got a little wyrd thing going on here, iv set my table to 100% wide and high, but its not filling the window. its only showing about 98% wide and high. however if i refresh (f5) it refreshes the page and then it does fill the window....

any idea's?

its doing it in internet explorer and netscape 6, only the refresh doesnt work in netscape, it stays on 98%

thanks,
thomas

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Do you have the margins set for the body of the page?

<body topMargin=0 leftMargin=0 rightMargin=0 bottomMargin=0>

-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
that helped, i didnt know about the existence of &quot;rightMargin=0 bottomMargin=0&quot;

live n learn :)

thanks,
thomas

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
I can't find them in the HTML 4.0 specification ( so at a guess they are proprietary IE only extensions.
You are better off setting the body margin with CSS, as you won't have to come back and fix it later (plus it will work with all current browsers rather than just IE).

Try this inside the <head></head> of your document:
Code:
<style>
body {
  margin: 0px;
  padding: 0px;
}
</style>

Have a look at for more examples of margin/padding CSS stuff.

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
also thanks :)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Topmargin and its cousins are IE-only extensions, the Netscape-only equivalents are marginheight and marginwidth. In pre-CSS days we had to specify them both, and many sites still do - Tek-Tips, for example, opens with
[tt]
<BODY BGCOLOR=&quot;#F6F6F6&quot; LEFTMARGIN=5 TOPMARGIN=5 MARGINWIDTH=5 MARGINHEIGHT=5 RIGHTMARGIN=5>
[/tt]
Read more at
Clarkin's CSS method is infinitely preferable, unless you have to cater for significant numbers of ancient pre-css browsers.

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top