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

128
Vistas
positioning items from created elements javascript

trying to study CSS/javascript and build something like the below Facebook posts. enter image description here

I've tried it with CSS grid and had problems where it overlapped all items when using inside for-loop (create multiple feeds like a Facebook website).

for (let i = 0; i < 5; i++) {
    var container = document.querySelector('.content');
    var profileImage = document.createElement("img");
    var username = document.createElement("p");
    container.append(profileImage, username);
}

I think the grid isn't the correct tool for a dynamically loaded website? is there any other CSS I can try? I don't even know what to look for? or study. :(

FYI- Tried it without Grid. it didn't look good, but all the posts displayed correctly from for-loop.

about 4 years ago · Juan Pablo Isaza
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