Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

137
Visualizações
Move the first list item to the bottom in an unordered list when browsing in tablet/mobile screen size

I have an unordered list like this -

<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>

I would like the first item of the list be automatically moved to the last when the website is being browsed in tablet/mobile screen view, and automatically moved back to the top when changing back to desktop screen view, i.e. responsive. The output in tablet/mobile screen view should be like this -

<ul>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 1</li>
</ul>

May I know it this can be achived by using JavaScript/CSS? Thank you.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use order properties to achieve this

@media(max-width: 991px){ /*you can change width according to your requirement*/
  ul {
    display: flex;
    flex-direction: column;
  }
  ul li:first-child {
    order: 4;
  }
}
<ul>
  <li>1</li>
  <li>2</li>
  <li>3</li>
  <li>4</li>
</ul>

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda