onscroll fix the div and add a class having troublle in mozilla


hello all i am having a page where there are two divs floating left one is of about 360 px and the other is auto width when the page scrolls the left div is added a class which makes it fixed to the screen and allows the oyher div to scroll. it is working in chrome but not in mozilla actually the div gets fixed but the other div gets behind the fixed div.

here is the code

 <div id="leftfixop909">
        <div id="MKAEitFIXED0">
  <div id="otherdiv">

         min-height:103%;margin-  left:-8px;
         box-shadow:    0 10px 20px -5px rgba(0, 0, 0, 0.75);}

              box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);}



           $(window).scroll(function () {
           var height=window.innerHeight;
                 var DIVHEIG=$("#MKAEitFIXED0").height();
            var NOWstoPS=(DIVHEIG-height);
          if ($(this).scrollTop() > NOWstoPS) {
           } else if ($(this).scrollTop() < NOWstoPS) {
               } });

is there anything you can suggest me i think the min-height property is not accepted by mozilla but if a fix the height i get a scroller or may get some matter trimmed .

Problem courtesy of: abhi


Here's the code that works for you. Add css for your div's as:

    position: absolute;

    position: relative;

That's it.

Solution courtesy of: Viswanath D


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.