On Oct 7, 2010, at 8:35 AM, Donald Fruy wrote:

> I am searching a CSS way to disable a vertical scrollbar on a page.
> 
> I succeeded with IE with the following CSS code :
> 
> body {
>   overflow-y: hidden;
>   overflow: auto;
> }
> 
> Do you know how to disable vertical scrolling in FF, Chrome and Safari ?

Perhaps by taking the cascade into account ? In your code as above, the 
'overflow' property actually overrides the 'overflow-y' property.

body {
  overflow: auto;
  overflow-y: hidden;
}

works as expected in Gecko and WebKit based browsers. You can even drop the 
'overflow:auto', as this is the default behaviour, unless you already applied 
to overflow property to the root element.

(another question is whether this is a good idea to do... accessibility wise)

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to