Angular Material 2 – How to lock mat-toolbar and mat-tabs to the top

Did you mean a sticky toolbar? You can add a class to the toolbar and make it sticky (using the position attribute set to sticky):

.app-toolbar {
    position: sticky;
    position: -webkit-sticky; /* For macOS/iOS Safari */
    top: 0; /* Sets the sticky toolbar to be on top */
    z-index: 1000; /* Ensure that your app's content doesn't overlap the toolbar */
}

Note: There is no support for position: sticky on IE 11. For more info on browser support for position: sticky, view this caniuse page.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)