Applying style to <html> and <body> in IE

admin

Administrator
Staff member
Hello.

I'm trying to remove the pointless, greyed out, scrollbar on pages that fit on 1 screen in IE 5 and 6.

The CSS to do it is
html, body {overflow-y:auto} however that is invalid CSS so I would like to do it via JS instead specifically for IE.

document.getElementById('blabla').style.overflow = 'auto';

would work (at least on the <div> I tried it on), but I'd like to avoid having to specify ID attributes for the <body> (IE 5.x) and <html> (IE 6) tags on every page.

So how would I do that most easily?

Since this is an IE specific "bugfix" proprietary code will work just fine :)
 
Top