Forum Moderators: open

Message Too Old, No Replies

Hide Internet Explorer 4's Scrollbar?

         

JAB Creations

4:58 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This works for IE5+...
body, html {overflow: hidden;}

Anyone know how to hide the scrollbar in IE4?

- John

vincevincevince

5:02 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You use a frameset with a single 100% frame set to scrolling="no"

Aside: Where did you find a visitor running IE4? There are some museums who would probably pay good money for him!

JAB Creations

5:23 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I will in exceptionally specific situations use frames. However this is too trivial an issue to complicate using frames.

I want my stuff to work in IE4, I'm running out of things to learn with (X)HTML/CSS. ;)

- John

rocknbil

6:35 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



this is too trivial an issue to complicate using frames.....I want my stuff to work in IE4

Do you see the contradiction here? :-)

If you really want to satisfy your masochism, load up Netscape 4 and make it work in that - ON A MAC!

Yeah I've got it here . . . it's a nightmare . . .

JAB Creations

6:53 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Over the past couple of months I've really fine tuned my understanding of CSS and how it was intended to be used. It can within reason display valid CSS1 just fine. The same CSS1 looks fine in IE4, Opera 4, and all versions of Gecko. Netscape 4 and tableless layouts are completely out of the question and if I really wanted to support Netscape 4 I'd just cloak with tables.

Oh, anyone have the answer to my original question? :)

- John

londrum

7:01 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



are you looking to hide the vertical scrollbar, when the content doesn't fill up the page? i seem to remember this doing the trick (it was a long time ago though..)

html { overflow: auto; }

JAB Creations

7:13 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This code is intended for Internet Explorer 4 and will work in to IE6. Completely ignore all other browsers as I am using cloaking (and have no desire to debate cloaking/browser specific code). We just need to get rid of the body's vertical scrollbar in IE4. :)

*Edit* - Because I know someone is going to post about this I am completely aware of the XML/quirks mode issue.

- John

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>One Hundred Percent height Divs</title>
<!--[if true]>
<style type="text/css">
/* IE 5.0-6.0 */
body, html {
background: #000;
height: 100%; /* this is the key! */
margin: 4px 3px 0px 4px;
padding: 0;
overflow: hidden;
width: 100%;
}
#bodyouter {
background: #eee;
height: 99%; /* works only if parent container is assigned a height value */
left: 3;
border: #479 solid;
border-width: 40px 1px 1px 1px;
position: absolute;
top: 3;
width: 100%;
}
#bodyinner {
background: #ddd;
height: 100%; /* works only if parent container is assigned a height value */
width: 100%;
}
#content {
background: #ccc;
height: 100%; /* works only if parent container is assigned a height value */
overflow: auto;
width: 100%;
}
</style>
<!--[if true]>
<![endif]-->

<![if false]>
<style type="text/css">
/* IE4 */

body, html {
background: #000;
height: 100%; /* this is the key! */
margin: 4px 3px 3px 4px;
padding: 0;
width: 100%;
}
#bodyouter {
background: #eee;
height: 100%; /* works only if parent container is assigned a height value */
left: 3;
border: #f0f solid;
border-width: 40px 1px 1px 1px;
position: absolute;
top: 3;
width: 100%;
}
#bodyinner {
background: #ddd;
height: 100%; /* works only if parent container is assigned a height value */
overflow: auto;
width: 100%;
}
#content {
background: #ccc;
height: 100%; /* works only if parent container is assigned a height value */
left: 0;
padding: 0;
position: absolute;
top: 0;
width: auto;
}

</style>
<![endif]>
</head>

<body>

<div id="bodyouter">
<div id="bodyinner">
<div id="content">
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
<p>content</p><p>content</p><p>content</p>
</div><!-- /#content -->
</div><!-- /#bodyinner -->
</div><!-- /#bodyouter -->

</body>
</html>

[edited by: JAB_Creations at 7:15 pm (utc) on Sep. 20, 2007]

Marshall

7:43 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Forgive me if I am wrong as I do not use conditional comments much, but are they correct? Should it not be:

<!--[if IE 4]>
<style type="text/css">
/*<![CDATA[*/

YOUR CSS

/*]]>*/
</style>
<![endif]-->

and

<!--[if gte IE 5]>
<style type="text/css">
/*<![CDATA[*/

YOUR CSS

/*]]>*/
</style>
<![endif]-->

Anyone feel free to correct me if I am wrong.

Marshall

JAB Creations

7:48 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Conditional Comments work in Internet Explorer 5.0+ on Windows only.

[msdn2.microsoft.com...]

The method I am using is served to Internet Explorer and will only apply on downlevel versions (less then 5.0).

- John

Marshall

7:59 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Learn new things every day :)

Marshall

JAB Creations

8:14 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Same here and I spend the majority of my spare time doing this stuff for fun. :)

JavaScript would be an acceptable method to achieve this if anyone has any ideas in that regards?

- John

JAB Creations

9:36 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was at MSDN2 yesterday and was looking at the scrollbar property for IE's JavaScript engine. Not sure if anything there will work with IE4, any one?
[msdn2.microsoft.com...]

- John

Drag_Racer

1:35 pm on Oct 2, 2007 (gmt 0)

10+ Year Member



<body scroll="no"> work in IE5, don't know about 4