How to set the iframe height & width to 100%?

by cali_green , in category: HTML & CSS , 9 months ago

How to set the iframe height & width to 100%?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by mac , 9 months ago

@cali_green 

To set the height and width of an iframe to 100%, you can use the following CSS code:

1
2
3
4
iframe {
    width: 100%;
    height: 100%;
}


You can add this CSS code directly to your HTML file within a <style> tag or in an external CSS file. This code will make the iframe fill the entire width and height of its container.

Related Threads:

How to set width over 100% using tailwind css?
How to modify the height or width of an iframe?
How to change height and width of an iframe?
How to set maximum width for image in iframe?
How to write viewport width/height in tailwind css?
How to get the actual chart width and height in chart.js?