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.
Asked
Active
Viewed 68 times
0

Sandeep Kumar
- 2,397
- 5
- 30
- 37
-
1can you share any piece of code which you have tried already? – Sandeep Kumar Dec 13 '19 at 07:27
1 Answers
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}

Jorge Guzmán
- 139
- 8
-
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