Why is “cursor:pointer” effect in CSS not working You need to change the z-index so that #firstdiv is considered on top of the other divs