Reputation: 24325
I have a bootstrap modal inside an iframe. If I scroll down within the iframe and execute the modal I cant see it because its at the top of the iframe where I have to scroll up to see it. Is there a way to have it stay within the viewport of the iframe?
Upvotes: 0
Views: 840
Reputation: 4420
Provided you'll always be scrolling to the bottom of the iframe to click the button that launches it, you can use a bit of CSS to push it more towards the bottom of the page/frame.
CSS:
.modal {
top: 50%;
}
The code for the modal is just the boilerplate code you'll find for modals in the Bootstrap documentation. I simply applied the CSS to the modal class.
Upvotes: 1