Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 3: Position modal window to bottom right of the screen

I've tried everything, don't get it.

Just want to fix the modal popup window to the bottom right corner of the screen, that's it.

This is how I'm showing my modal:

let modal = this._ModalController.create(MyPage, { group: group }, {cssClass: 'custom-modal' });
modal.present(); 

And I was trying css, but with no luck:

.custom-modal {
  .modal-wrapper {
    position: absolute !important;
    bottom: 0px;
    right: 0px;
  }
}
like image 618
Dave Avatar asked Sep 15 '25 19:09

Dave


1 Answers

Fixed it with:

@media only screen and (min-height: 600px) and (min-width: 768px)
{
  .custom-modal {
    .modal-wrapper {
      position: absolute;
      width: 766px !important;
      height: 500px !important;
      top: calc(100% - (500px));
      left: calc(100% - (766px)) !important;
    }
  }
}
like image 110
Dave Avatar answered Sep 18 '25 08:09

Dave