I am embedding a link to a web page using an iframe with no height or width settings. What would the iframe embed code be if I wanted to embed the iframe where the size of the iframe will also be the size of the vh. As an example I am hosting the html code for the link I am embedding and I need the height of the iframe to correspond to the 100vh that is referenced in the HTML code.
<iframe src='https://www.google.com' ></iframe>
vs.
<iframe src='https://www.google.com' width=? height=? ></iframe>
You can set style for iframe
<!DOCTYPE html> <html> <style> iframe { height: 50vh; width: 100%; } </style> <body> <iframe src="iframe.html"/> </body> </html>
2.1m questions
2.1m answers
60 comments
57.0k users