Let me begin by providing some context. I am currently developing a responsive page that uses percentages to position my divs, allowing users to drag and drop items wherever they please. However, a problem arises when the user positions an object too close to the edge of the page. When the browser is resized, the images start to extend off the page and get cropped.
#div1
{
overflow: hidden;
right: <?php variable>;
bottom: <?php variable>;
}
#div2
{
overflow: hidden;
left: <?php variable>;
top: <?php variable>;
}
My goal is to allow percentages to control the placement until the edge of the page, then set specific variables like 10px so it never extends off the page.
I considered using JavaScript (if statements), but wondered if there was a simpler solution using CSS properties. Any guidance or suggestions would be greatly welcomed.
Thank you,
Rob