Developerzzz
Developerzzz

Reputation: 1126

Angular Material button alignment

sorry, I am new 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.

Upvotes: 0

Views: 815

Answers (2)

Awais Khan
Awais Khan

Reputation: 37

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

Upvotes: 2

kian
kian

Reputation: 1705

add this code in css file

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

Upvotes: 1

Related Questions