Ultrashock Forums > Creative Software > Web
Tables. Never truly 100% height!

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Tables. Never truly 100% height!
Old 2003-04-28

I've got a table that is set to 100% height of the browser. Now howcome it doesn't display on the web as 100% height of the browser like its supposed to. No that'd make perfect sense otherwise wouldn't it?!

Can anyone help? I've tried going into code view in Dreamweaver and changing the page properties like topmargin"0".... and I've added bottommargin="0" but still nothing. Aaarrrghh.

It always leaves a little gap at the bottom. Please help. Then I'll be happy. Thank you.
They pretend to pay me so I pretend to work.
postbit arrow 30 comments | 882 views postbit arrow Reply: with Quote   
Registered User
as_clark20 is offline
seperator
Posts: 125
2002-08-12
Age: 27
seperator

Ultrashock Member Comments:
NewEzra's Avatar NewEzra NewEzra is offline Moderator NewEzra lives in United States 2003-04-28 #2 Old  
This works fine for me:

Code:
<HTML>
<HEAD>
<TITLE>index</TITLE>
</HEAD>
<BODY bgcolor="#999999" topmargin="0" bottommargin="0">
<table width="740" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="740" valign="top" bgcolor="#000000">&nbsp;</td>
  </tr>
</table>
</BODY>
</HTML>
Reply With Quote  
Nico Nico is offline 2003-04-28 #3 Old  
Bluebox's code should work in most browsers, however the height attribute of the <table> tag is deprecated by the W3C and the use of it is discouraged.
The height attribute isn't displayed correctly in some browsers, like Netscape 6.x

I recommend the use of CCS to set the height.

cheers
Reply With Quote  
Nico Nico is offline 2003-04-28 #4 Old  
And this my sound stupid but make sure cellspace is set to 0, you'll never know
Reply With Quote  
swinhoe swinhoe is offline 2003-04-29 #5 Old  
could it be that the page margins were not set to 0 ????


just a thought...
Reply With Quote  
as_clark20 as_clark20 is offline 2003-04-29 #6 Old  
All Margins Set to Zero
I've set all margins to Zero, Cell Pad to Zero, Cell Space to Zero - everything I know that can be set to zero is. I dont get it. I still get this 10-15 pixel gap at the bottom which is really beginning to try my patience as it just doesn't look professional with a big gap at the bottom.
Reply With Quote  
swinhoe swinhoe is offline 2003-04-29 #7 Old  
u got a link for me to look at ?
Reply With Quote  
trilogic trilogic is offline 2003-04-29 #8 Old  
you might have a space or even a paragraph after your table?
Reply With Quote  
as_clark20 as_clark20 is offline 2003-04-29 #9 Old  
http://www.brakepart.co.uk/noflash.html

It seems to work when you go to it directly, try clicking the LEARN ABOUT FLASH link at the top too. On my browser (IE6) The white column doesn't extend all the way to the bottom, neither do the shadows at the sides. Please let me know if it works on anyother browsers.
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-04-29 #10 Old  
it looked good in IE6 and Netscape 7 on XP pro..

But I've discovered that in IExplorer, when you set a table's height to 100% it indeed leaves a small space at the bottom and when you hit refresh it resizes to the full 100%.. I've had the same problem with a couple of designs I made..
Reply With Quote  
as_clark20 as_clark20 is offline 2003-04-29 #11 Old  
Well atleast I know I'm not going mad then and that other have had the same problem. Anyway to combat it other than destroy the entire internet?!
Reply With Quote  
trilogic trilogic is offline 2003-04-29 #12 Old  
looks good without gap on osx safari
Reply With Quote  
swinhoe swinhoe is offline 2003-04-29 #13 Old  
i couldnt see any issues,...

but then, ive not dealt with this myself firsthand...

*leaves the ball in x zero x 's court...*


Reply With Quote  
Neurowave Neurowave is offline 2003-04-29 #14 Old  
You can fix this issue by using CSS to force all your margins, padding, etc to zero. Used to drive me crazy a few years ago on a site I was working on

Code:
<style type="text/css">
<!--
Body {
	margin-top: 0px;
	margin-right: 0px; 
	margin-bottom: 0px;
	margin-left: 0px;
	padding-top: 0px;
	padding-right: 0px; 
	padding-bottom: 0px;
	padding-left: 0px; 
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
}
-->
</style>
Good luck!
Reply With Quote  
abenson abenson is offline 2003-04-29 #15 Old  
dude i looked into your HTML and you have an error in your body tag:

bottommargn="0"

change to

bottommargin="0"
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-04-29 #16 Old  
abenson, I made a little test with all margins at '0' with the same problem.. check this out.. it shows a table scaled to 100%, but not displaying at 100%.. when I hit refresh it resizes to the full heigth..

edit: just found out something strange... when you follow the link it's actually the full height, but when you open a new browser en paste the URL into it, you'll see the problem.. !?
Reply With Quote  
Neurowave Neurowave is offline 2003-04-29 #17 Old  
x zero x, try what I posted... it'll fix it
Reply With Quote  
as_clark20 as_clark20 is offline 2003-04-29 #18 Old  
Thanks guys and gals.
Oh and thank you very much Abenson, I didn't notice my spelling error until you brought it up - thanks for checking out my source code dude! It seems to work fine on my browser now. Big sigh of relief. I'm sure I'll probably find away to cause havok later so I'll be back crying about some other problem. Damn me and my spelling and curse my brain!!

Big smiles everyone!
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-04-29 #19 Old  
I know.. "bottommargin" isn't correct HTML, but I thought it was strange that when following a link it'll be displayed correct, but when entering the URL by hand it won't.. It also explaines why everyone in this thread doesn't see any problem at As_clark20's site (try pasting the url by hand into the adres-bar.. you'll see what I mean)..

to sum it up; yes, css will fix the problem
Reply With Quote  
Nico Nico is offline 2003-04-30 #20 Old  
Originally posted by x zero x
to sum it up; yes, css will fix the problem
That's what i said
Reply With Quote  
mouthlock mouthlock is offline Moderator mouthlock lives in Canada 2003-04-30 #21 Old  
'| Had that problem a LONG time ago, didn't have forum buddies to help me out though just an HTML 4 manual *LMAO*

'| Glad it works now
Reply With Quote  
swinhoe swinhoe is offline 2003-04-30 #22 Old  
glad thats sorted....

its weird how it does that with the url....

good work fellas'...
Reply With Quote  
colorblind colorblind is offline Moderator colorblind lives in Austria 2003-05-01 #23 Old  
Another guess would be:

scroll=auto; in your body TAG ... It looks a like the space at the bottom is to be reserved for a vertical scrollbar, which only leaves after you refresh (considering the browser then knows you don't need it ... !! ) ...
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-05-02 #24 Old  
yeah, thought about the same thing.. but that still doesn't explain why it works when you follow a link and not when you enter the URL by hand..
Reply With Quote  
colorblind colorblind is offline Moderator colorblind lives in Austria 2003-05-02 #25 Old  
Well, there is a difference in following a link and passing it by entering it by hand ... not exactly the same procedure for the browser I guess ...
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-05-02 #26 Old  
hmm.. I guess what it could be is that when you follow a link the browser's height and width have already been stored somehow and are accessable to define the height and width in pixels from the 100%..
when you enter the URL by hand the browser probably doesn't have that info to use and thus doesn't know wether to display a scrollbar or not.. The browser waits untill the site has been fully loaded and does not display the scrollbar because the sites' width doesn't exceed the browsers' width.. but because the site has been built up with the browser reserving that space for the scrollbar it displays only the backgroundcolor.. (and thus not showing the table at a full 100%)
Reply With Quote  
colorblind colorblind is offline Moderator colorblind lives in Austria 2003-05-02 #27 Old  
that would be my guess exaclty x zero x ... so setting the scroll-property on "auto" would help I guess .. !!
Reply With Quote  
mls mls is offline 2003-05-30 #28 Old  
I can't tell you how many times I had come crossed that same problem. The last splash page I created for my site, had issues with there being a space from a width standpoint. I couldn't figure it out. I know this might sound crazy, but I used the rightmargin <tag> and seem to fix that problem. I did the same thing before I added that <tag> when refreshing the browser it seem to be 100%.
Reply With Quote  
Azaloth Azaloth is offline 2003-05-31 #29 Old  
As far as I know, this is a bug in certain version of IE6 that many people experience...and as posted earlier, CSS styling should fix the problem.
Reply With Quote  
colorblind colorblind is offline Moderator colorblind lives in Austria 2003-06-04 #30 Old  
Also, there is a unknown HTML command for the <body> tag

Code:
scroll="auto"
// or
scroll="no"
// or
scroll="yes"
I have not yet tried to validate the command, but it works fine with IFrames as I've just used it for them today .. !!
Reply With Quote  
x zero x x zero x is offline x zero x lives in Netherlands 2003-07-30 #31 Old  
*bump* for the people in the Front-End forum..

// Colorblind, have you validated it yet?
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: