Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70765

How to center a popover horizontally on iOS?

$
0
0

@ioclaudio wrote:

Hi,
I’d like to center a popover horizontally.

With this code:

  async popupTerms() {
  
    const popover = await this.popoverController.create({
      component: TermsPopupPage,
      event: ev,
      translucent: false,
      cssClass: 'terms-popover',
      showBackdrop: true,
      backdropDismiss: false,
    });
	
    return await popover.present();
  }

and this CSS:

   .terms-popover{
   --width: 90%;
   position: absolute;
 }

The popover is centered horizontally on Android, but not on iOS.
How can I center the popover on both Android and iOS?

Thank you very much

cld

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70765

Trending Articles