Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda