Web Analytics Made Easy -
StatCounter Stationary Div in IE - CodingForum

Announcement

Collapse
No announcement yet.

Stationary Div in IE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    http://www.cssplay.co.uk/layouts/fixed.html

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

    Comment


    • #3
      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

      Comment


      • #4
        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!||||

        Comment


        • #5
          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

          Comment

          Working...
          X