0

I'm using this css for a-z list

#a-z {
  float: left;
  width: 100%;
  margin-bottom: 25px;
  display: flex;
  flex-direction: row;
}
ul#a-z li {
  flex-grow: 1;
  padding: 7px;
  text-align: center;
  background: #282c39;
  color: #fff;
  text-transform: uppercase;
  border-left: 2px solid #1d1b24;
}

html

<ul id="a-z">
<li class="active" data-letter="#">#</li>
<li class="active" data-letter=a>a</li>
<li class="active" data-letter=b>b</li>
<li class="active" data-letter=c>c</li>
</ul>

enter image description here

I would like to make it responsive and adaptable to mobile devices, is it possible to find a solution? Thanks in advance

pippo
  • 3
  • 3

1 Answers1

1

If only you showed the full content of your HTML but you can wrap your flex item when the container width can't fit the flex children using flex-wrap:wrap; property

Ndifreke
  • 732
  • 1
  • 8
  • 13