Home > OS >  Angular Material button alignment
Angular Material button alignment

Time:10-24

sorry I am very basic in CSS, I am trying to align button to right but not able to do it. below is my code.

<mat-card-header>
 <mat-card-title>
  {{rosterDetails.dutyDate}} ({{rosterDetails.dutyTime}})
 </mat-card-title>
 <button mat-icon-button (click)="goBack()">
    <mat-icon>arrow_back</mat-icon>
 </button>
</mat-card-header>

i am using angular material.

CodePudding user response:

  <button class="d-flex ms-auto" mat-icon-button (click)="goBack()">
      <mat-icon>arrow_back</mat-icon>
    </button>

CodePudding user response:

add this code in css file

mat-card-header {
  display: flex;
  justify-content: space-between;
}
  • Related