Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>The title of the document</title> <style> section { display: flex; align-items: center; height: 120px; padding: 10px; background: #99caff; } div { height: 60px; background: #1c87c9; margin: 5px; } div:nth-child(1) { align-self: flex-start; background: #8ebf42; } </style> </head> <body> <h2>Align-self property example</h2> <p>Here the align-self for the first box is set to "flex-start".</p> <section> <div>Box #1</div> <div>Box #2</div> <div>Box #3</div> </section> </body> </html>