Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Stationary Div in IE

    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

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    http://www.cssplay.co.uk/layouts/fixed.html

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

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mark87 View Post
    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

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Did you even read the link? Did you look at the source code?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •