Log in

View Full Version : Getting a scroll to work in IE6?



paul8agrape
11-03-2006, 11:02 PM
Right off, I'll say I'm a bit new to CSS, so be gentle. :) I was recently told that in order to get a link like the one below (just a test sub-web) to work in IE6 (in which only the middle section would scroll), I had to insert this code:


html {
overflow:hidden;
}

body {
height:100%;
overflow:auto;
}


I have been trying this for a week and have checked in more than one forum for help. I am desperate. I just need someone to look at my code and suggest a way to clean it up and exactly where the code above should go in my .css file. :confused:

http://rain.edchinn.com/bio.shtml

ItsMeOnly
11-03-2006, 11:26 PM
overflow: auto is the default behaviour,
body {height: 100%} with overflow not hidden can cause some undesirable effects in IE like double scrollbar (and as I see it, it does it in FF as well on your site).

basically you might look at this page:
http://cssplay.co.uk/layouts/fixit.html
If i'm not mistaken, this is the layout you want to achieve.

paul8agrape
11-03-2006, 11:39 PM
Actually it works fine in FF. I just don't have it coded right for now. I'll update it to its "working" condition tonight.

paul8agrape
11-03-2006, 11:42 PM
I don't have it coded like this for now but I can tell you that this is the version of the code I'm supposed to use (according to another forum).


<style>
body {margin:0;}
#header {

background:#000000;
color:#ffffff;
top:0;
position:fixed;
height:80px;
width:100%;
}

#footer {
background-color:#000000;
color:#ffffff;
bottom: 0;
position: fixed;
height:80px;
width:100%;
overflow: hidden;
z-index: 100;
}
#content {
padding: 0;
margin: 0;
top:80px;
bottom:80px;
position:fixed;
width:100%;
overflow:auto;
}
</style>

Here is a sample site of exactly what I want to do in IE6. http://designreverb.com/test_noFrames.htm