Autoreply: Re: [Javascript] Re: scrollbars

postmaster at LaTech.edu postmaster at LaTech.edu
Fri Apr 1 12:52:38 CST 2005


The Mailbox davecline is currently unavailable.
It is in deactivated state and is not receiving mails.


Your message reads:

Received: from tank.electric.net (unverified [216.129.90.111]) by ucmmail.com
 (Rockliffe SMTPRA 6.1.17) with ESMTP id <B0039068841 at securemail.onebox.com> for <davecline at onebox.com>;
 Fri, 1 Apr 2005 13:52:38 -0500
Received: from emrelay.onebox.com by tank.electric.net with host-route (Exim 4.34)
	id 1DHRG1-00011o-47
	for davecline at onebox.com; Fri, 01 Apr 2005 10:52:37 -0800
Received: by emcmailer; Fri, 01 Apr 2005 10:52:37 -0800
Received: from selene.latech.edu ([138.47.18.25] helo=LaTech.edu)
	by tank.electric.net with esmtp (Exim 4.34)
	id 1DHRFt-0000uO-66
	for davecline at onebox.com; Fri, 01 Apr 2005 10:52:30 -0800
Received: from localhost (localhost [127.0.0.1])
	by LaTech.edu (Postfix) with ESMTP id 1E9393090CC;
	Fri,  1 Apr 2005 12:52:22 -0600 (CST)
Received: from LaTech.edu ([127.0.0.1])
 by localhost (selene.latech.edu [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id 08926-01-10; Fri,  1 Apr 2005 12:52:13 -0600 (CST)
Received: from selene.LaTech.edu (localhost [127.0.0.1])
	by LaTech.edu (Postfix) with ESMTP id 0BDCB308C2F;
	Fri,  1 Apr 2005 12:52:12 -0600 (CST)
X-Original-To: javascript at localhost.LaTech.edu
Delivered-To: javascript at localhost.LaTech.edu
Received: from localhost (localhost [127.0.0.1])
	by LaTech.edu (Postfix) with ESMTP id 9615D308A0A
	for <javascript at localhost.LaTech.edu>;
	Fri,  1 Apr 2005 12:52:09 -0600 (CST)
Received: from LaTech.edu ([127.0.0.1])
	by localhost (selene.latech.edu [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id 99184-01-11 for <javascript at localhost.LaTech.edu>;
	Fri,  1 Apr 2005 12:52:04 -0600 (CST)
Received: from mail.doxdesk.com (mail.doxdesk.com [217.115.141.160])
	by LaTech.edu (Postfix) with ESMTP id 69311308961
	for <javascript at LaTech.edu>; Fri,  1 Apr 2005 12:52:04 -0600 (CST)
Received: from [192.168.0.12] (blossom [61.213.122.58])
	by mail.doxdesk.com (Postfix) with ESMTP id 0525613928
	for <javascript at LaTech.edu>; Fri,  1 Apr 2005 18:36:58 +0000 (GMT)
Message-ID: <424D9872.6040607 at doxdesk.com>
Date: Sat, 02 Apr 2005 03:52:34 +0900
From: Andrew Clover <and-babble at doxdesk.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: "[JavaScript List]" <javascript at LaTech.edu>
Subject: Re: [Javascript] Re: scrollbars
References: <BAY18-DAV16E12CC86F26F05F7D8AB5B8470 at phx.gbl>
In-Reply-To: <BAY18-DAV16E12CC86F26F05F7D8AB5B8470 at phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at latech.edu
X-BeenThere: javascript at LaTech.edu
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
List-Id: "\[JavaScript List\]" <javascript.LaTech.edu>
List-Unsubscribe: <https://lists.LaTech.edu/mailman/listinfo/javascript>,
	<mailto:javascript-request at LaTech.edu?subject=unsubscribe>
List-Archive: <http://lists.LaTech.edu/pipermail/javascript>
List-Post: <mailto:javascript at LaTech.edu>
List-Help: <mailto:javascript-request at LaTech.edu?subject=help>
List-Subscribe: <https://lists.LaTech.edu/mailman/listinfo/javascript>,
	<mailto:javascript-request at LaTech.edu?subject=subscribe>
Sender: javascript-bounces at LaTech.edu
Errors-To: javascript-bounces at LaTech.edu
X-Virus-Scanned: by amavisd-new at latech.edu
X-Origin-IP: 138.47.18.25
X-SPAM-Status: NO, -0.2 / 4.0 DCC [0.0] BAYES [0%]
X-Virus-Status: Scanned by VirusSMART (s)
X-SPAM-Summary: DCC=0.0,REFERENCES=-0.2

Dash <forgetful54341087097153001984 at hotmail.com> wrote:

> ok, i modified the script to make it work. In the body tag of the page,
> i've defined style="overflow:hidden;", so surely i dont need to check
> for document.documentElement (if it's defined in the html file in the
> body tag, it wouldn't shift anywhere else, would it?). 

document.documentElement actually refers to the root <html> element - 
you would need to put the style in <html> as well to have the same 
effect as the script version. The issue is that IE6/Standards makes the 
<html> element represent the viewport, whilst IE5 and IE6/Quirks makes 
the <body> element represent the viewport. The style has to be applied 
to the correct element (or both) to make the vertical scrollbar go away 
in IE/Win.

Other browsers (correctly according to spec) don't have an element to 
represent the viewport; instead the viewport is 'above' the root element 
(<html>) and can't be touched with CSS, though since it only displays a 
scrollbar when there's too much vertical content to fit on-screen this 
isn't generally a problem.

To actually get rid of 'necessary' scrollbars in all browsers is harder 
than just fixing IE/Win's unnecessary ones. You'd need to set a block to 
"overflow: hidden" *and* ensure that its height was the same as the 
viewport, which is trickier than it sounds: there is no reliable 
standards-compliant cross-browser-compatible way to give an element 
'height: 100%' of the viewport. You can do it for many browsers (not 
IE/Win) in a standards-compliant way using 'position: fixed; height: 
100%', and for many browsers (not IE/Mac) in a 
not-quite-standards-compliant way using 'position: absolute; height: 
100%'. Any way you slice it you'll end up with browser hacks.

Alternatively if you know the height of the content (eg. it's images or 
unwrapped fixed-size text) you could simply put the lot in a <div> with 
hidden overflow and a fixed-size height.

> I want to be able to do this because i dont want the user to be able to
> scroll down the page until an event occurs.

Overflow is probably not a good mechanism for doing this. Some browsers 
would still let you access the hidden content (possibly accidentally) 
through keyboard control, for example. Not to mention very large screen 
resolutions. Any reason you couldn't just use a simple hidden <div> that 
gets displayed when the event occurs?

-- 
Andrew Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list