Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

79
Views
Make the List to be responsive design

Goal:
Make the list (ul and its li) to be responsive design in relation to the screen's width.

Problem:
I don't know how to solve it.

Info:
*You need to take account to amount of li in each ul list. Different responsive design depends on the width of the ul.
*Each ul can be random from 1 to 10 li or more.

JSBin:
https://jsbin.com/xibalahave/edit?html,css,output

Thank you!


.aaa ul.listlist {
  margin: 10px 0 16px;
  padding: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.aaa ul.listlist li {
  font-size: 1.125rem;
  display: block;
  margin-right: 24px;
  line-height: 22px;
  border-radius: 12px 12px 12px 12px;
  padding: 8px 24px;
  background-color: #00FFFF;
  white-space: nowrap;
}
<div class="aaa">
  <ul class="listlist">
    <li>1Test 1</li>
    <li>1Test 2</li>
    <li>1Test 3</li>
  </ul>
</div>
<br />
<div class="aaa">
  <ul class="listlist">
    <li>1Test 1</li>
    <li>1Test 2</li>
    <li>1Test 3</li>
    <li>1Test 4</li>
  </ul>
</div>
<br />
<div class="aaa">
  <ul class="listlist">
    <li>1Test 1</li>
    <li>1Test 2</li>
  </ul>
</div>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can simply add a flexwrap: wrap; to the container of the li, it will allow the child-elements (here, li), to go to another line. I invite you to learn about the flexbox and all their properties, this is very helpful for the responsive design! Check it out here.

.listlist{
  display: flex;
  flex-wrap: wrap;
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!