Existe el siguiente código del archivo HTML principal:
<!DOCTYPE html> <html> <head> <title>Read Text File</title> </head> <body> <iframe src="http://localhost:8092/iframe.html"/> </body> </html>Y hay código de 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>Como puede ver, mi archivo principal incluye iframe. Mi pregunta: ¿es posible poner div con id "emergente" en el centro de la pantalla (no solo iframe)? El dominio del archivo principal y el dominio del iframe no son lo mismo.
Gracias por adelantado.