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

Problem

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></div>
  <div id="otherdiv">
  </div> 


        #leftfixop909{max-width:365px;
         min-height:103%;margin-  left:-8px;
            float:left;width:35%;min-width:360px;
           overflow:auto;overflow-x:hidden;
         box-shadow:    0 10px 20px -5px rgba(0, 0, 0, 0.75);}

           #MKAEitFIXED0{width:365px;min-height:101%;
           background:url(webimg/mainbg.png);
            padding-bottom:20px;z-index:99;overflow:auto;
              box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);}

             .RighTFIXIEDbot{position:fixed;bottom:0px;}

           #otherdiv{width:auto;
           overflow:hidden;min-height:150%;margin-top:46px;padding-left:20px;}



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

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

Solution

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

#leftfixop909{
    position: absolute;
}

#otherdiv{
    position: relative;
}

That's it.

Solution courtesy of: Viswanath D

Discussion

There is currently no discussion for this recipe.

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