Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .box { width: 350px; height: 200px; padding-left: 0; list-style-type: none; border: 1px dashed black; display: -webkit-flex; display: flex; } .box div { flex: 1; } .green { background-color: #8ebf42; } .blue { background-color: #1c87c9; } .gray { background-color: #666666; } </style> </head> <body> <h2>Flex property example</h2> <div class="box"> <div class="green">GREEN</div> <div class="blue">BLUE</div> <div class="gray">GRAY</div> </div> </body> </html>