Help with Responsive iframe formatting

Asked

Viewed 342 times

0

Hello I need help I have a google form that I want to put on a page with the format of 1280*800 and the problem and that does not occupy the page completely hides always or at the end of the form or if I touch the iframe it hides content I want it to occupy the by potion of the page on width and height, can help me or indicate me some way ,even in css I tried to fix the positioning but can not know why, thank you.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>teste</title>
</head>

<body>
	<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSd4pzJ9kRydc-UVkEkm9xKDZjF0S3Earn-Wjcbh8FEAlYnkXA/viewform?embedded=true" width="100%" height="825" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</body>
</html>

  • I believe not to have been very clear your question, you want the iframe to occupy the whole screen is this?

  • Do you want it to adjust in height or width? It has to have how much of measure?

  • yes I want the form to be with the definition of 1280x800 because when I give these measures to the iframe it cuts the form on the site, but if it gives to put in width should solve the problem .

  • I have this to test on the Chrome console and firefox console with this measurement and always cuts iframe never occupies the screen completely , which is what I want.

1 answer

0

I used this css code in the 1280x800 format on the Chrome console and the height continues to work badly I do not want that scroll aside want to fill the page . I also changed the html to see if a measured div will fix the iframe .

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
html, body, .main, .main iframe {
    margin: 0;
    width: 100%;
    height: 100%;
}
.main iframe {
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
<div class="main">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSd4pzJ9kRydc-UVkEkm9xKDZjF0S3Earn-Wjcbh8FEAlYnkXA/viewform?embedded=true" frameborder="0" marginheight="0">Loading...</iframe>
</div>
</body>
</html>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.