I created a web site that shows the directory list in the server. In backend all the directories are getting indexed and shown in an another webpage called dirpage. So I used an iframe in mainpage to show the content of dirpage. The mainpage and dirpage are working great. But when the dirpage is shown in the iframe, the content overflows. The iframe width is limited to the <div> width. The problem is the iframe overflow is taking a new line to show the content. Here is the main page.
<head> <style> #divmain{ display: flex; flex-direction: row; } #div1{ background: rgb(244, 236, 225); width: 30%; height: 600px; float: left; } #div2{ background: black; width: 70%; height: 600px; float: right; } #button1{ height:44px; width:50px; float:left; } #button2{ height:44px; width:50px; float:left; } #input1{ display:none; float:right; width:295px; height:44px; } #iframe1{ height:500px; width:390px; background: transparent; overflow: scroll; } </style> </head> <body onmousedown="buttonclick1(event)"> <h1>online storage</h1> <div id="divmain"> <script> function buttonclick1(e){ if (e.target.id !== "input1") document.getElementById("input1").style.display="none" } function buttonclick2(e){ if (e.target.id == "button1") document.getElementById("input1").name="folder" if (e.target.id == "button2") document.getElementById("input1").name="file" } </script> <div id="div1"> <hr style="margin-top:0;"> <button id="button1" onclick="document.getElementById('input1').style.display='block'" onmousedown=buttonclick2(event)><a>Folder</a></button> <button id="button2" onclick="document.getElementById('input1').style.display='block'" onmousedown=buttonclick2(event)><a>File</a></button> <form id="form1" action="session" > <input id="input1" type="text" name=""> </form><br><br> <hr style="margin-top:10px;"><br> <iframe id="iframe1" src="dirpage.html"> </iframe> </div> <div id="div2"> </div> </div> </body> Here is an image of dirpage and mainpage. I can't add the code of dirpage. because the content are very sensitive. It doesn't contain anything other than <p> paragraphs and buttons.
Now what I need to do is show the overflown content with a scroll bar. Not with a newline. I tried overflow: scroll. But It's not working. Any help would be greatly appreciated.

