I have integrated some dashboard widgets in iframes and I want to ensure they are responsive. My goal is for each widget to occupy full width when the screen size is reduced, but appear side by side when the browser window is large (md
+):
iframe {
background: pink;
border: 1px solid #333 !important;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d5b7babaa1a6a1a7b4a595e1fbe3fbe7">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<div id="myContainer" class="flex-row container-fluid col-xs-12 col-xl-8 pl-0 pr-0 pl-lg-4 pr-lg-4">
<div class="row" style="padding-bottom: 160px;">
<div class="col-12 col-md-6 pr-1 mt-1 col">
<iframe src="iframe-link" allowfullscreen="" style="display: initial; height: 200%; border: 0px; width: 100%;"></iframe>
</div>
<div class="col-12 col-md-6 pl-md-1 mt-1 col">
<iframe src="iframe-link" allowfullscreen="" style="display: initial; height: 200%; border: 0px; width: 100%;"></iframe>
</div>
</div>
</div>
The challenge I'm facing is that when I reduce the browser window, the upper iframe overlaps with the lower one:
https://i.sstatic.net/q3GDi.png
Any suggestions on how to resolve this issue?
PS: The libraries/frameworks I am utilizing include:
"react-bootstrap": "^1.4.3"
"bootstrap": "^4.6.0",