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

282
Vistas
Align center the Popup child window based on parent window inner height

How to set Popup child window center of parent window for different browsers

Please check here

Please check the below code. Tried below code for child popup center.

code var new_window;
function winOpen(){
width = window.innerWidth - 100; height = window.innerHeight - 120; var top = (screen.height - window.innerHeight) - 10; var left = 100 / 3;
new_window=window.open('https://www.google.com',"_blank","toolbar=0, help:no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=" + width + ", height=" + height + ",top=" + top + ",left=" + left + "");
}
code

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

0

You can center elements inside the DOM in numerous ways, they are too many to list. However, usually it is done without JavaScript (your tag), but rather with CSS.

One way is by setting display:flex;, place-items:center and justify-content:center; on the parent;

Here is an example:

.parent {
  width: 150px;
  height: 150px;
  background: #08f;
  
  display: flex;
  justify-content: center;
  place-items: center;
}

.child {
  width: 95px;
  height: 95px;
  background: #0a0;
}
<div class="parent">
  <div class="child">Child</div>
</div>

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