Skip to content Skip to sidebar Skip to footer

Flexbox/float - 2 1 2 Layout

I'm trying to create a 2 1 2 layout using Flexbox or floats as seen in the image added to this question. Is there any way to do this successfully using just an ordered list of item

Solution 1:

You could do this with flex-direction: column and flex-wrap: wrap but i think you must set fixed height on parent

body, html, ul {
  margin: 0;
  padding: 0;
}
* {
  box-sizing: border-box;
}
ul {
  display: flex;
  height: 100vh; 
  list-style-type: none;
  flex-direction: column;
  flex-wrap: wrap;
}
li {
  flex: 0050%;
  border: 1px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}
li:nth-child(3) {
  flex: 00100%;
}
<ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>

Post a Comment for "Flexbox/float - 2 1 2 Layout"