user1059511 user1059511 -4 years ago 153
CSS Question

position fixed div over scrollable div - can't scroll

I have a fixed div over a div that I want to scroll. When my mouse is over the fixed div I can not scroll the div. Is there anyway around this?

#scroll {
width:660px;
height:300px;
overflow-y:scroll
}

#fixed {
width:100%;
height:100px;
padding:20px;
box-sizing: border-box;
position:fixed;
bottom:0px;
background:red;

}


http://codepen.io/garethj/pen/PpPmdJ

Answer Source

Add pointer-events:none; this allow you to scroll, even when your cursor is on #fixed div

#fixed {
  width:100%;
  height:100px;
  padding:20px;
  box-sizing: border-box;
  position:fixed;
  bottom:0px;
  background:red;
  pointer-events:none; /*Add this*/
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download