I started with this SO answer and I was trying to use the pure flexbox answer that was provided.
However I see the following result when I try this.
I am not sure why Button 4 is appearing higher on the row then the rest of the elements.
HTML
<div class="customFlexContainer">
<div>
<mat-form-field>
<mat-label>Search</mat-label>
<input matInput placeholder="Search" #searchString />
</mat-form-field>
<button color="primary" mat-button >Button 1</button>
<button color="primary" mat-button (click)="doSomething()">Button 2</button>
<button color="primary" mat-button (click)="doSomething()">Button 3</button>
</div>
<div>
<button mat-button color="primary" (click)="do2()">Button 4</button>
</div>
</div>
CSS
.customFlexContainer {
display: flex;
justify-content: space-between;
height: 0%;
align-content: center;
}
button {
margin: 5px;
}
EDIT:
In my style.css the following line appears to possibly be causing the issue.
@import "~@angular/material/prebuilt-themes/deeppurple-amber.css";*
If I comment it out it aligns correctly, but the page is not styled at all.