Skip to main content

FxLayoutAlign

The fxLayoutAlign directive should be used on DOM containers whose children should be aligned on the main and cross-axis (optional)

<div fxLayout="row" fxLayoutAlign="center center">
<div>1. One</div>
<div>2. Two</div>
<div>3. Three</div>
<div>4. Four</div>
</div>

fxLayoutAlign Options

Shown below are the supported fxLayoutAlign directive values and their resulting CSS stylings on the hosting element container

Main Axis

ValueEquivalent CSS
'' (default)justify-content: flex-start
startjustify-content: flex-start
centerjustify-content: center
endjustify-content: flex-end
space-aroundjustify-content: space-around
space-betweenjustify-content: space-between
space-evenlyjustify-content: space-evenly

Cross Axis (optional)

ValueEquivalent CSS
(default)align-items: flex-start; align-content: flex-start
startalign-items: flex-start; align-content: flex-start
centeralign-items: center; align-content: center
endalign-items: flex-end; align-content: flex-end
space-aroundalign-items: space-around; align-content: space-around
space-betweenalign-items: space-between; align-content: space-between
space-evenlyalign-items: space-evenly; align-content: space-evenly
stretchmax-width: 100% if flex-direction: column; else max-height: 100%