I am currently implementing a modal pop-up on a website with a simple design featuring a white solid color background. The CSS styling for the modal is as follows:
<style>
#element_to_pop_up
{
display:none;
background-color:#ffffff;
width:500px;
height:250px;
padding-left:20px;
padding-right:20px;
padding-top:20px;
}
</style>
To close the modal, users can simply click anywhere outside the modal window.
I have a transparent PNG "x" icon that I want to position at the upper right corner of the modal. Since clicking on this icon will also trigger the closing of the modal by essentially clicking outside its boundaries, no additional coding is needed.
Can anyone provide guidance on how to add this PNG icon so that it remains fixed in the upper right corner of the modal but is positioned outside the main element class, allowing it to function as the "close-trigger" area of the page?