0

I am using template-based modal in my project, and modal position is in the middle of the page by default. Instead of this, I want to show the modal in top position. enter image description here

Sandeep Kumar
  • 2,397
  • 5
  • 30
  • 37

1 Answers1

1

A modal is defined as 'position:absolute'(or 'fixed'), so also has a position in 'x' and 'y'. You can change this position, in it case in 'x' (top or bottom) in your css. Example:

.modal {position: absolute; top: 0}

or

.modal {position: fixed; top: 0}
  • This will update the position of all modals across the application. Is there a way to update the position of specific modals alone? – Gowtham Sankaran Mar 31 '21 at 06:35