473,898 Members | 3,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unnecessary white space at bottom for netscape

Hi I have a very strange problem for my page. I have writen a js to make
sure my table's height is 100% for the browser's viewport. my code is just
the following. This works fine for firefox and IE. but in netscape, i found
there is some white space at the bottom of the page whose height is about
10- 20 pixal. and these white space cause the v-scrollbar appears. I have no
idea what is wrong here. Can any one help me on this one.

Cheers
Victor

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body style="padding: 0;margin:0; ">
<form id="form1" runat="server">
<script type="text/javascript">
function getWindowHeight ()
{
var windowHeight=0;
var minWindowHeight = 700;
if (typeof(window. innerHeight)==' number')
{
windowHeight = window.innerHei ght;
}
else
{
if (document.docum entElement&&
document.docume ntElement.clien tHeight)
{
windowHeight = document.docume ntElement.clien tHeight;
}
else
{
if (document.body& &document.body. clientHeight)
{
windowHeight = document.body.c lientHeight;
}
}
}

if (windowHeight < minWindowHeight )
windowHeight = minWindowHeight ;

return windowHeight;
}

function setHeight()
{
if (document.getEl ementById)
{
var windowHeight=ge tWindowHeight() ;

if (windowHeight 0)
{
var tblMain = document.getEle mentById("tblMa in");
tblMain.style.h eight = windowHeight + 'px';
}
}
}

window.onload = function() {setHeight();}
window.onresize = function() {setHeight();}

</script>
<table id="tblMain" cellpadding="0" cellspacing="0" width="980px"
style="border:s olid 1px red;">
<tr>
<td>
testing info
</td>
</tr>
</table>
</form>
</body>
</html>
Feb 28 '07 #1
2 1550
On Feb 28, 3:30 am, "Victor" <vic...@noemail .noemailwrote:
Hi I have a very strange problem for my page. I have writen a js to make
sure my table's height is 100% for the browser's viewport. my code is just
the following. This works fine for firefox and IE. but in netscape, i found
there is some white space at the bottom of the page whose height is about
10- 20 pixal. and these white space cause the v-scrollbar appears. I have no
idea what is wrong here. Can any one help me on this one.

Cheers
Victor

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body style="padding: 0;margin:0; ">
<form id="form1" runat="server">
<script type="text/javascript">
function getWindowHeight ()
{
var windowHeight=0;
var minWindowHeight = 700;
if (typeof(window. innerHeight)==' number')
{
windowHeight = window.innerHei ght;
}
else
{
if (document.docum entElement&&
document.docume ntElement.clien tHeight)
{
windowHeight = document.docume ntElement.clien tHeight;
}
else
{
if (document.body& &document.body. clientHeight)
{
windowHeight = document.body.c lientHeight;
}
}
}

if (windowHeight < minWindowHeight )
windowHeight = minWindowHeight ;

return windowHeight;
}

function setHeight()
{
if (document.getEl ementById)
{
var windowHeight=ge tWindowHeight() ;

if (windowHeight 0)
{
var tblMain = document.getEle mentById("tblMa in");
tblMain.style.h eight = windowHeight + 'px';
}
}
}

window.onload = function() {setHeight();}
window.onresize = function() {setHeight();}

</script>
<table id="tblMain" cellpadding="0" cellspacing="0" width="980px"
style="border:s olid 1px red;">
<tr>
<td>
testing info
</td>
</tr>
</table>
</form>
</body>
</html>
here's nothing related to ASP.NET

Netscape's window.innerWid th and window.innerHei ght properties always
included the width/height of scrollbars
http://www.jibbering.com/2002/7/drunclear-measure.html

Feb 28 '07 #2
Hello Victor,

Regarding on the problem page, have you tried compare the client-side
rendered html source to see whether there is any different between the
netscape and other browsers? If not, I'm afraid the problem is likely due
to the netscape's particular rendering engine. Also, you can try manually
set all the margin(four margin css style attrributes) to see whether it
helps.

<body style="margin-bottom:0; margin-left:0; margin-right:0; margin-top:0">

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
9140
by: Stanimir Stamenkov | last post by:
Is it possible to make two inline elements to appear adjacent stripping any white space appearing in between in the source? Example: <span class="adj">1</span> <span class="adj">2</span> <span class="adj">3</span> --
2
3403
by: Jerry Sievers | last post by:
tried to avoid using PRE in the page markup and instead used DIV CLASS=foo and assigned the white-space pre property to it. have some reports already that text is not showing as preformatted. looks ok with mozilla 1.4 though. http://www.jerrysievers.com/Projects/UPSMon/?title=Makefile&file=Makefile comments please.
5
12359
by: Applebrown | last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple layout, and I'm finding myself stuck with small white space in between my images where I planned for the graphics to be stacked up right on top of one another. Here's the simple vertical layout: width is 640px, centered with a CSS border. I'd...
0
15201
by: Mark Moore | last post by:
I'm trying to layout a couple text input fields and their corresponding labels without using a table. When I was trying to debug my understanding of CSS, I was *very* surprised to see that span's with borders behave counter-intuitively (IMHO) when using style="white-space: nowrap;". Below is a fairly small chunk of XHTML that demonstrates what I'm talking about. What gives? -Mark
6
12163
by: Tony T | last post by:
Can anyone help me with this - it may be obvious, but I just can't see it. I'm working with PC and WinME. In IE6, the two divs inside the wrapping div have no space between them, which is how I want it to be, but in NN6.2 and Opera7.11 there's a gap between them. I've tried all the fixes I can think of, but can't get it to work. Any help would be much appreciated. Pared-down example: http://www.tonyturton.com/test/styletest.html...
11
5183
by: namenotgivenhere | last post by:
My design goal is to make the white space above and below <p> and <ul> equal to the height of my font. The first step to achieving this I believe is to have an equal amount of white space above or below <p> and <ul>. Can someone suggest a method using css to accomplish this? I have succeeded in doing this in IE6 but I'd also like to know if there's a method to achive this goal that will have a similar visual look in other modern browsers....
28
1927
by: Alan Silver | last post by:
Hello, Here I am again with another "why does IE do that" question!! Please have a look at http://www.kidsinaction.org.uk/fd/homepage.html and see if you can work out why IE adds a one pixel white space on the left and right side of the links with the light-green backgrounds. It doesn't do it on the header links, which have darker green backgrounds. FF and Opera don't add the pixel at all, which is what I would expect as
4
1515
by: Nathan Sokalski | last post by:
I have two asp:ImageMaps in a table cell as follows: <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="center"> <asp:ImageMap ID="mapBanner" runat="server" BorderWidth="0px" Height="82px" ImageUrl="../images/top_banner.jpg" Width="1000px" style="margin:0px;padding:0px;"> <asp:RectangleHotSpot Left="125" Top="5" Right="200" Bottom="22"
3
12537
by: amandadev | last post by:
Hi there, Please take a look at: bluecelery.amandadevries.com/index.html as well as the CSS and tell me why there is a white space in the table in Firefox (that looks like a white horizontal line running through the entire layout) which isn't present in IE (which, by the way, is the way I want it to be).
0
9840
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10857
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10948
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10483
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9661
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4706
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.