[thelist] URGENT css question

Saila, Craig Craig.Saila at bgminteractive.com
Thu Jun 20 16:45:01 CDT 2002


> -----Original Message-----
> From: Bigpant [mailto:bigpant at btinternet.com]
> Sent: June 20, 2002 4:40 PM

> >>remove the scrollbars:
> >>  HTML, BODY { overflow: hidden; }
>
> Surely this will remove scrollbars whether you need them or
> not. When you do need them, they will not appear.

It would yes, I missed that Erick wanted them to appear occasionally. An
alternate approach would be to use JavaScript to detect if there is an
overflow and if there is to turn the property's value back to auto.

For example, assuming a window is known to be 500 pixels high run a
JavaScript version of this pseudo-script on load:

 if(BODY.height>500){
   HTML.style.overflow = "auto";
   BODY.style.overflow = "auto";
 else
   HTML.style.overflow = "hidden";
   BODY.style.overflow = "hidden";

--
Cheers,

Craig Saila
------------------------------------------
craig at saila.com : http://www.saila.com/
------------------------------------------



More information about the thelist mailing list