Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Horizontal scrollbox not showing all elements

how do I make the horizontal scroll box show all elements as scrolling from left to right?

Currently i’ve got this result: enter image description here some elements are not visible inside and can’t be scrolled more to the left

.tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: scroll;
  width: 100%;
}

.tag {
  padding: 10px;
  border: 3px solid rgba(0, 0, 0, 0.07);
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 5px;
}
<div class="tags">
  <div class="tag">JavaScript</div>
  <div class="tag">HTML</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
  <div class="tag">CSS</div>
</div>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try removing justify-content: center from tags class. I hope it will work

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading