Search code examples
iospopupionic-v1

Ionic Popup Custom CSS iOS issue


I have customized the Popup css to have it in fixed position and horizontally aligned in the center of the screen. It displays correctly in Android device, but way of in iOS. Below is the css I have and the screenshot for iOS and Android. How can I fix the issue in iOS?

.credit-deny-popup .popup {
    position: fixed;
    top: 60px;
    margin-left:auto;
    margin-right:auto;
    width: 250px;
    height: 250px;
}
.credit-deny-popup .popup-title {
    font-weight: bold;
    font-size: larger;
    color: #FFFFFF;
}
.credit-deny-popup .popup-head {
    background-color: #387EF5;
}

iOS Screenshot

iOS Screenshot

Android Screenshot

Android Screenshot

Thank you in advance!


Solution

  • As suggested by @DaDanny in https://forum.ionicframework.com/t/ionic-popup-position/111102/4 fixed the issue. I had to add left and right in the css as well.

    .credit-deny-popup .popup {
        position: fixed;
        top: 60px;
        margin-left:auto;
        margin-right:auto;
        left: 0;
        right: 0;
        width: 250px;
        height: 250px;
    }