javascript - fixed div overlaps scrollbar -


i have problem fixed div placed in other div scrollbar. overlaps scrollbar. happend under safari , ie 11. when set z- index lower divs scrollbar fixed div under , losses interaction (you cant click links etc).also tried make fake fixed position setting absolute , javascript set "left" "scrollleft" div scrollbar cant use solution because gives strange effects under safari , ie10.

here code:

html

<div id="cont">   <div class="spacer s2"></div>   <div id="target" class="box2 blue">      <a href="dfsdfsd">dsfsdf</a>   </div> </div> 

css

#cont {     width:100%;     height:800px;     overflow:hidden;     overflow-x: scroll;     z-index:0 } #target {     width:200px;     height:800px;     position:fixed;     overflow:hidden;     background-color:red;     z-index:0 } .spacer {     width:3000px;     height:1px;     z-index:-1 } 

and link jsfiddle.

please me ive tried find solution on 3 days

thanks in advance

change position fixed absolute

<div id="target" class="box2 blue" style="width:200px;height:800px;position:absolute;overflow:hidden;background-color:red;z-index:0">                 <a href="dfsdfsd">dsfsdf</a>                 </div> 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -