Home > database >  How to position a button at the bottom of a slide - Ionic
How to position a button at the bottom of a slide - Ionic

Time:06-04

I have the following slides of images:

  <ion-slides style="margin-top: 30px; margin-bottom: 30px" pager="true" [options]="slideOpts">
    <ion-slide *ngFor="let image of imageURLs">
      <div (click)="openZoomedImage(image.fullURL)">
        <img [src]="image.fullURL" alt=”slide-1”/>
      </div>
      <ion-button size="small" color="danger"  (click)="deleteImage(image.imageName)">Delete</ion-button>
    </ion-slide>
  </ion-slides>

However I am wondering how I can make the delete button for each image at the bottom of the slides?

Thank You

CodePudding user response:

wrap it inside a div and use css.

.selector{
   position: absolute;
   bottom: 0;
   right: 10px;
}

this css will send your button to right bottom.

Check this stackblitz for demo:

Ion Slides Demo

  • Related