How to modify the height or width of an iframe?

Member

by lottie , in category: Javascript , 3 months ago

How to modify the height or width of an iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by muriel.schmidt , 3 months ago

@lottie 

To modify the height or width of an iframe, you can add a style attribute to the iframe tag with the desired height and width values. Here's an example:

1
<iframe src="https://www.example.com" style="width: 500px; height: 300px;"></iframe>


In the above example, the iframe will have a width of 500 pixels and a height of 300 pixels. You can adjust these values as needed to fit your design requirements.