<ul class="flex">
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

<ul class="grid">
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul, li {
  list-style: none inside none;
}

body {
  width: 100vw;
  min-height: 100vh;
  padding: 1vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

ul {
  padding: 1vw;
  border: 1px solid #eee;
  border-radius: 5px;
  box-shadow: 0 0 2px rgba(0,0,0,.25);
  margin: 1vw;
  min-width: 40vw;
}

li {
  min-height: 10vh;
  background: #f36;
  margin: 5px;
}

.flex {
  display: flex;
  justify-content: space-around;
  
  li {
    flex: 1;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

ul::before {
  content: 'x';
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 10vh;
  background: #f36;
  margin: 5px;
  color: #fff;
}

.flex::before {
  flex: 1;
}

ul > :nth-child(1) {
  background: #f90;
  border:2px solid #09f;
}

ul > :nth-last-child(2) {
  background: #09f;
  border:2px solid #f90;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.