Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
¿Cómo centrar el contenido de este div, que se crea cuando se hace clic en un botón y está dentro de un div flexible?

Cuando se envía el formulario, el contenido de la página se reemplaza y aparece un mensaje de agradecimiento. Ahora va en un <div> , pero se establece a su izquierda.

Aquí está la parte html resultante:

 <div class="row"> <div style="color:#373737;text-align:center"> <h5>Thank you!</h5> <p> We will be processing your response! </p> </div> </div>

Esta es la pieza de javascript :

 function saveData() { var searchForm = document.getElementById('search-form') var page = document.getElementById("page"); var table = document.getElementById("dtable"); page.innerHTML = ""; table.innerHTML = ""; searchForm.closest("div.row").innerHTML = "<div style='color:#373737;text-align:center'><h5>Thank you!</h5>" + "<p>We will be processing your response!</p>"+ "</div" }

¡Gracias por tu ayuda!

Aquí hay un intento: ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Prueba esto:

 searchForm.closest("div.row").innerHTML = "<div style='color:#373737;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column'><h5>Thank you!</h5>" + "<p>We will be processing your response!</p>"+ "</div"
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!