When the "Launch demo modal" button is clicked:
I would like the modal to adjust its width and height based on the user's screen resolution, maximizing the available space. Additionally, I want the modal to appear in the top left corner of the document.
Instead of manually setting specific width and height values, how can I make it responsive to each user's unique resolution?
Despite using the top: 0 and left: 0 properties, the modal doesn't appear correctly – it seems cut off at the top and not fully aligned to the left.
EDIT
After realizing that there was a default negative margin set by Bootstrap CSS on the modal class, I found a solution that works:
.modal {
top: 0;
left: 0;
width: 100%;
margin: 0;
}
To handle the height dynamically, I plan to use jQuery to determine the viewport height and apply it as an inline style.