height= "100%"
- Started
- Last post
- 29 Responses
- Epictive
I must be a moron. But I am starting to build an HTML version of this: http://www.visitmarshallislands.… and it isn't being displayed right by Netscape. This is what I have: http://www.visitmarshallislands.… it looks fine on I.E., but on Netscape it isn’t going 100% height. What did I do wrong? I have looked over my code many times, can't figure it out. I will bow to who ever helps me. Thanks.
- Mick0
I'm not 100% sure (scuse the pun) but I don't think NS supports the 100% height tag.
- Epictive0
That was my fear. Is there anyway I could fake it?
-A
- xrusos0
create a javascript with a transparent pixel image that has a variable for the height attribute. place the script in some inconspicuous place on the site and it will make sure to have a minimum height to the table, site, etc. set the image height to whatever you want the minimum height to be.
- xrusos0
try this:
// height of elements above and below this one
var heightSubtract= 117;
var totalH;
var cellH;
ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4))
if (ns4) {
totalH = innerHeight;
}
else {
totalH = document.body.clientHeight;
}
cellH = totalH - heightSubtract;
document.write('[img src="clear.gif" widht="1" height="'+cellH+'"]');
- trebor0
Netscape do support 100% I use it all the time when i want to center a site..
- xrusos0
of course change the "[" to "
- xrusos0
that's ] to >
- unknown0
dude, check your email...i sent you the changed code.
- Epictive0
Thanks all. Trebor, i have used it to center a site too, but I don't think it works if all you want is 100% hieght and not width. IDK. It is weird.
-A
- trebor0
http://www.tryckvag.net/100.html…
works fine on my machine in Netscape Communicator 4.51
- lyrek0
I totally need a layperson's explanation of that, xrusos. :)
Anyone know of a tutorial online?
- Epictive0
Damn, I stand corrected, Thanks so much MrNiceGuy, what the heck did I have wrong? I owe you.
-A
- unknown0
hmm...im not quite sure. i just added an extra table around what you had. netscape is buggy like that. i wouldnt be too concerned over it though.
who uses netscape anyways? not me.
- unknown0
oh, i also put area maps BELOW your body tag just b/c it sometimes plays havoc by acting as a whitespace in the code. and we all know white spaces suck.
- lyrek0
huh? how'd you fix?
- xrusos0
laypersons explanation:
basically, if you want to force a height in all browswers, put a transparent image in your site, 1 pixel wide and 1000pixels tall (if you want to force 1000 pixel height for all pages)since you don't want to force all pages to 1000 pixels, make the height attribute a javascript variable. (by using the script i pasted earlier)
then you subtract the height of things like headers (if the transparent gif is below them), and there you have it... a site with a forced height of at least "n" pixels
this works great for sites that are heavy in content, except for a few pages that look dinky because there isn't much content. this way there is a minimum height despite the lack of content.
is that better?
- monkeyme0
I think I had this exact same issue the other day with this 100% height thing and not working in Netscape.
Someone on NT suggested I nest the table inside of a table and that worked for me.
- mnty0
i use height="99%"
- lyrek0
xrusos...thanks!
- unknown0
well I'll make this short.
100% value works on NN only if the value of height is set inside the tag. If you use xHTML syntax and use CSS style sheets, it won't work. So to put it in plain terms: If you use CSS to manipulate height of the table to 100% it won't work, if defined inside the tag, it works.
Cheers.