Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

292
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda