0

I want to make the 2 li in the last row, next to each other, and not in the middle. I am using flex, so that it can be responsive in smaller screens.

http://codepen.io/anon/pen/VexZQK

ul {
  display: flex;
  margin: 0 auto;
  padding: 0;
  width: 800px;
  list-style: none;
  flex-wrap: wrap;
  background-color: red;
  justify-content: space-between;
}

li {
  display: flex-item;
  padding: 15px 0;
  transition: transform .5s ease-in-out;
  transform: scale(1);
  margin: 10px auto;
  background-color: blue;
  width: 150px;
}
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Pruthvi P
  • 536
  • 1
  • 7
  • 31

1 Answers1

0

you can try this one:\

ul {
  display: flex;
  margin: 0 auto;
  padding: 0;
  width: 800px;
  list-style: none;
  flex-wrap: wrap;
  background-color: red;
  justify-content: space-between;
  display:inline-block;
}

li {
  display: flex-item;
  padding: 15px 0;
  transition: transform .5s ease-in-out;
  transform: scale(1);
  margin: 10px auto;
  background-color: blue;
  width: 150px;
  display:inline-block;
}

DEMO HERE

Ivin Raj
  • 3,448
  • 2
  • 28
  • 65