Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .white-container { display: grid; grid-template-columns: auto auto auto; grid-template-rows: auto auto; grid-auto-flow: row; grid-gap: 10px; background-color: #ccc; padding: 10px; } .white-container > div { background-color: #fff; text-align: center; padding: 20px 0; font-size: 30px; } </style> </head> <body> <h2>Grid-auto-flow property example</h2> <h3>grid-auto-flow: row</h3> <div class="white-container"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> </body> </html>