I have this web page that I was given at work that displays a modal (a pop up basically) when you click a link(s). Here's the CSS snippet for that:
.modal
{
background-color: white;
border: solid 4px black;
position: relative;
top: 150;
left: 25;
width: 300px;
height: 300px;
padding: 0px;
}
The top & left control the pop up's position on the page. So basically they want the pop up to display wherever the mouse is. I've figured out how to capture the mouse X &Y coordinates in javascript but don't know how to transfer the values to the CSS section of the code. Is there another way I can do this?
.modal
{
background-color: white;
border: solid 4px black;
position: relative;
top: 150;
left: 25;
width: 300px;
height: 300px;
padding: 0px;
}
The top & left control the pop up's position on the page. So basically they want the pop up to display wherever the mouse is. I've figured out how to capture the mouse X &Y coordinates in javascript but don't know how to transfer the values to the CSS section of the code. Is there another way I can do this?