Full-Screen iframe with a Height of 100%
Question:
Can iframes with a height of 100% be reliably implemented across all major browsers (IE, Firefox, Safari), using the following HTML code:
<iframe src="xyz.pdf" width="100%" height="100%" />
Answer:
Using an iframe with a height of 100% is not universally supported in all browsers. To achieve a full-screen iframe, consider the following approaches:
Method 1:
<body>
Method 2:
<body>
Hiding Scrollbars:
In addition to setting the height, you can hide scrollbars by:
Option 1:
<iframe src="http://www.youraddress.com" frameborder="0">
Option 2:
<body>
This method hides scrollbars by making the iframe exceed the size of the parent body and using the overflow:hidden property on the body to conceal any protruding areas.
The above is the detailed content of How Can I Reliably Create a Full-Screen Iframe Across Different Browsers?. For more information, please follow other related articles on the PHP Chinese website!