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

157
Vistas
How to make cells automatcially go to a new row

I have a table that is 650px wide and I add words to this table...each word is in its own cell. However if I have too many words then it expands the table.
What I want to do is allow it to limit the X and auto go to a new row or under the current content so it doesn't resize the table.

I thought about calculating the width of each cell using JS..but it says each is 0px as the cells are created programmatically using JS.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Perhaps a table is not the best solution for you, since it doesn't have this functionality.

You could try simple <div>'s, they will wrap, but you could also have a look at the newer, and more advanced, Flexbox. Have a look at the Wrapping section on that page.

about 4 years ago · Juan Pablo Isaza Denunciar

0

I got it work by using

 #tGrammar {
  display: block;
  }

 #tGrammar td {
  display: inline-block;
  }

in CSS

and in JS where is tChoicesMain is table

tChoicesMain.style.tableLayout = "fixed";
tChoicesMain.style.maxWidth = "650px";
tChoicesMain.setAttribute("id", "tGrammar");
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