<!DOCTYPE html> <html> <head> <style> .flex-demo-container { color: #fff; display: flex; flex-wrap: nowrap; background-color: blue; } .flex-demo-container > div { color: #fff; background-color: maroon; width: 100px; margin: 10px; text-align: center; line-height: 75px; font-size: 30px; } </style> </head> <body> <h1>Flexible Boxes</h1> <p>resize the browser to see effect.</p> <div class="flex-demo-container"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> </div> </body> </html>