<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="/assets/reset.css" rel="stylesheet"> <link href="setup.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> <ol> <li> <p>Item 1</p> </li> <li> <p>Item 2</p> </li> <li> <p>Item 3</p> </li> </ol> </body> </html>
body { font-family: sans-serif; padding: 20px; } ol { background-color: gold; } li { background-color: tomato; border-bottom: 2px solid firebrick; border-right: 2px solid firebrick; padding: 5px; }
body { display: flex; /* Puts the `ol` in a row! */ column-gap: 12px; /* Will talk about this, below. */ height: 100vh; /* Force a height. */ } ol { display: flex; flex-direction: column; /* Vertical! */ } ol:nth-child(1) { justify-content: start; } /* Default. */ ol:nth-child(2) { justify-content: center; } ol:nth-child(3) { justify-content: end; } ol:nth-child(4) { justify-content: space-between; } ol:nth-child(5) { justify-content: space-around; } ol:nth-child(6) { justify-content: space-evenly; }