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.