-2

I have this code:

<button style="z-index: 999999" mat-fab color="primary">
  <mat-icon style="z-index: 999999" aria-label="left">chevron_left</mat-icon>
</button>

but it's still resulting in this:

enter image description here

I want to get the chevron icon to the front, but I am not sure what to do.

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

1 Answers1

1

Important note: You are strongly advised not to use inline style attributes. Please use classes instead. Reasons why


One thing you can do is, as I said in the comment above, try to set a z-index for the <mat-card> which is lower than the z-index of the FAB (aka a Floating Action Button):

<mat-card style="z-index: 9999">
  <!-- ... -->
</mat-card>

<!-- FAB -->
<button style="z-index: 999999" mat-fab color="primary">
  <mat-icon style="z-index: 999999" aria-label="left">chevron_left</mat-icon>
</button>

Demo (see styles.scss)

Edric
  • 24,639
  • 13
  • 81
  • 91