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

130
Vistas
How to move div to the center of the screen from iframe?

There is the following code of main HTML file:

<!DOCTYPE html>
<html>
  <head>
    <title>Read Text File</title>
  </head>
  
  <body>
    <iframe src="http://localhost:8092/iframe.html"/>
  </body>
</html>

And there is code of iframe:

<!DOCTYPE html>
<html>
  <head>
    <title>Read Text File</title>
  </head>
    
  <body>
    <div id="text">This just text</div>
    <button id="btn">Click</button>
    <div id="popup">Center</div>
    <script>
      document.querySelector('#btn').addEventListener('click', () => {
        alert('center');
      });
    </script>
  </body>
</html>

As you can see, my main file includes iframe. My question: is it possible to put div with id "popup" in center of the screen (not only iframe)? Domain of main file and domain of iframe are not the same.

Thanks in advance.

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