0

I have the following row in a mat-card-header:

<div fxLayout="row" fxLayoutGap="20px" fxFlex="1 1 100%">
        <div fxLayoutAlign="start" fxFlex="1 1 60%" >
          <h1 class="mat-title" color="accent">{{model.get_price()}}</h1>
        </div> 
        <div fxLayoutAlign="end" fxFlex="1 1 40%"><img mat-card-image class="card_cover_logo" src="{{model.image_path}}"></div> 
</div>

The result is the following:

enter image description here

The price and the image are not aligned. The image is higher than the text. Is there any flex directive to adjust that?

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Kerby82
  • 4,934
  • 14
  • 48
  • 74

1 Answers1

0

You should add a align-items: center on the parent element. Assuming the flex direction is row, this should align the items to their vertical center.

Yathi
  • 1,011
  • 1
  • 12
  • 21