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

184
Visualizações
Styling a div based on the flex wrap property using javaScript

A created a function that renders buttons depending on how many data gotten from database.

I want to use js to set the style the button container differently,

especially setting property of of the button container to flex direction to column when it starts wrapping,

Since the website can have many buttons.

Is there a way to use javascript to check for the flexwrap property of the button container.

I tried this code but it is returning an empty string Console.log (btnContainer.style.flexWrap)

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

0

try running btnContainer.style in the console directly, rather than console.log(). hope it will help you find a solution

about 4 years ago · Juan Pablo Isaza Relatório

0

This commend check only inline style like <div style="flex-wrap:wrap;"></div>. Now if you console.log(document.querySelector('div').style.flexWrap) you will get string with value "wrap".

The solution your problem is add style this element in html inline as I wrote above or in js like document.querySelector('div').style.flexWrap = wrap

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