Sometimes, we want to make an iframe full screen with CSS.
In this article, we’ll look at how to make an iframe full screen with CSS.
How to make an iframe full screen with CSS?
To make an iframe full screen with CSS, we remove the margin from the body element.
For instance, we write
body {
margin: 0;
}
to remove margins from the body element.
Then we put our iframe in the body as its direct child.
Conclusion
To make an iframe full screen with CSS, we remove the margin from the body element.