Find centralized, trusted content and collaborate around the technologies you use most. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. While using W3Schools, you agree to have read and accepted our. If the main axis is in the block direction because flex-direction is set to column, then justify-content will distribute space between items in that dimension as long as there is space in the flex container to distribute. You can take a look at the code of this example below. We can use other values to control how the items align: In the live example below, the value of align-items is stretch. However, the benefits of native HTML elements enhanced using JavaScript are totally lost if JavaScript is broken or disabled, making them inaccessible. Remain calm. If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: