...

View Full Version : Stationary Div in IE



cassiusk101
09-23-2006, 11:10 PM
How do I create a stationary div (one that remains still) while the the rest of the page scrolls up?


.div5 {
background-color663399; color:white;
border2px solid; border-color:ffffff;
width:200px; height:200px; overflow:auto;
position:absolute; z-index:1; left:50%; top:0%;
margin-left:-450px; margin-top:280px; text-align:center;
visibility:visible;}


I already tried chaning the position to 'fixed' but no dice...thanx in advance

mark87
09-23-2006, 11:59 PM
http://www.cssplay.co.uk/layouts/fixed.html

You need to set the body to 100% height with overflow-y:auto. IE bugs. :)

cassiusk101
09-24-2006, 03:04 AM
http://www.cssplay.co.uk/layouts/fixed.html

You need to set the body to 100% height with overflow-y:auto. IE bugs. :)


Okay...this is what I changed it to

.div5 {
body {height:100%; overflow-y:auto; }
background-color663399; color:white;
border2px solid; border-color:ffffff;
width:200px; height:100%; overflow-y:auto;
position:absolute; z-index:1; left:50%; top:0%;
margin-left:-450px; margin-top:280px; text-align:center;
visibility:visible;}

But still no go....was I supposed to insert the height % and overflow info somewhere else?...Thanx in advance

_Aerospace_Eng_
09-24-2006, 06:58 AM
Did you even read the link? Did you look at the source code?

cassiusk101
09-24-2006, 06:30 PM
Did you even read the link? Did you look at the source code?

Of course I looked at the link AND the source code

but

#adsie {position:fixed; top:10px; left:0;}
html {background:rgb(123,187,221);}
body {margin:0; padding:0 10px 0 10px; border:0; height:100%; overflow-y:auto; background:rgb(123,187,221);}
body {font-family: georgia, serif; font-size:16px;}
#page {margin:310px 0 50px 250px; display:block; width:500px; border:1px solid #000; background:#fff; padding:10px;}

doesn't bare to many similarities to

.div5 {
background-color663399; color:white;
border2px solid; border-color:ffffff;
width:200px; height:200px; overflow:auto;
position:absolute; z-index:1; left:50%; top:0%;
margin-left:-450px; margin-top:280px; text-align:center;
visibility:visible;}

the code that I am working with...so I'd hope you would understand where the confusion would arise as to where I'd have to place the adjustments. So again I ask: should I change the "height px" to "height %" and the "overflow:auto" to "overflow-y:auto"?

Thanks again for your patience and understanding



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum