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