iframes (General)

by Taurec, Thursday, July 22, 2021, 05:16 (1003 days ago) @ markp1313
edited by Taurec, Thursday, July 22, 2021, 05:32

Hello!

The frameset tag is deprecated since HTML 5.

Try this instead:

<!DOCTYPE html>
<html>
<body>
<iframe src="My own HTML.html"></iframe>
<iframe src="https://mylittleforum.net/"></iframe>
</body>
</html>

The iframe is stylable like any other HTML element. If you don't want the frames to appear side by side, you have to define them as block elements. Additionaly it could be recommendable to stretch it to 100 % page width, adjust the individual iframe's heights and get rid of the borders and page margins. This could look as follows:

<!DOCTYPE html>
<html>
<head>
<style>
  html, body {
    height: 100%;
    margin: 0;
  }
  iframe {
    display: block;
    width: 100%;
    border: 0;
  }
  #one {
    height: 20%;
  }
  #two {
    height: 80%;
  }
</style>
</head>
<body>
<iframe id="one" src="My own HTML.html"></iframe>
<iframe id="two" src="https://mylittleforum.net/"></iframe>
</body>
</html>

See here for additional info.

greetings
Taurec


Complete thread:

 RSS Feed of thread