I have created a div with an initial position set.
<div class="guide" >
<style>
.guide{
height:150px;
width:200px;
position:absolute;
right:-170px;
top: 10%;
}
</style>
My goal is for the div to slide out from the right side when clicked. However, I am experiencing an issue where the window provides horizontal scrolling, causing the div to be fully visible if a person scrolls to the right. I want to prevent this horizontal scroll so that the div is only visible when clicked on. Can someone explain why the div sometimes goes beyond -ve pixels and sometimes doesn't? Why is this inconsistency happening?