Maverik Minett
Maverik Minett

Reputation: 2452

Bootstrap Grid System does not work inside mat-expansion-panel

When using the Boostrap 4 grid system inside the Angular/Material mat-expansion-panel, the grid elements do not fit into the grid. All elements in a row do not fit and the last element carries over to a new line.

Upvotes: 7

Views: 1209

Answers (2)

Esmaeel Motaghi
Esmaeel Motaghi

Reputation: 31

for all elements in a row, obviously have col-* class, add this style:

col-* {  box-sizing: border-box;}

Upvotes: 0

Maverik Minett
Maverik Minett

Reputation: 2452

The Bootstrap grid system expects all elements to have the box-sizing set to border-box. To fix this just add the following css to your page.

.mat-expansion-panel{
    box-sizing: border-box;
}

Upvotes: 9

Related Questions