align content of div to center flex code example Example: css flex center horizontally and vertically display: flex; align-items: center; justify-content: center;