app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styles: [`
.mat-divider {
margin-top: 20px;
margin-bottom: 20px
}
`]
})
export class AppComponent { }
app.component.html
<h2 style="padding-top:25px; padding-bottom:25px;">
Angular Material - How to change Divider margin
</h2>
<h4 style="margin-bottom:25px;">
Divider marign : top and bottom 20 pixels
</h4>
<button mat-raised-button color="primary">
First Button
</button>
<mat-divider></mat-divider>
<button mat-raised-button color="primary">
Second Button
</button>
<mat-divider></mat-divider>
<button mat-raised-button color="primary">
Third Button
</button>
app.module.ts [import]
import {MatDividerModule} from '@angular/material/divider'
import {MatButtonModule} from '@angular/material/button'
- angular material - How to change Divider width
- angular material - How to change Divider thickness
- angular material - How to change vertical Divider height
- angular material - How to use Progress spinner
- angular material - How to use Card
- angular material - How to use Tabs
- angular material - How to use custom label in Tabs
- angular material - How to slow Tabs content transition
- angular material - How to get Tabs selected index
- angular material - How to use Tabs selectedTabChange event
- angular material - How to show Badge in a button
- angular material - How to show Badge with icon
- angular material - Badge position before & below after
- angular material - Determine an Expansion Panel is disabled or enabled
- angular material - How to toggle Expansion Panel expanded state