2012,
When you post code on a page, please put three backticks on a line by themselves above the code, and three backticks on a line by themselves after the code. Like this:
```
your html and CSS here
```
If you have not read out posting guidelines, yet, please do so here:
Forum Posting Basics
I would like to see a screen shot or drawing that shows the imbedded iframe on the page with your Wordpress site. I cannot tell from the above image or from your code how it is supposed to fit on the page. I cannot see that it has a small issue because I cannot see the overall page.
It would be most helpful if your code were posted in the format of a “working page”. One that starts with <doctype
and ends with </html>
and includes enough CSS and HTML to demonstrate the issue.
If you cannot post a working page, then a link to the site along with a clear description of the problem would probably do.
A very basic guess…
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>template</title>
<!--
https://www.sitepoint.com/community/t/responsive-iframe-help-needed-please/214453
2012
Feb 4,2016 10:45 PM
-->
<style type="text/css">
body {
padding:0;
margin:0;
}
iframe {
display:block;
width:90%; /* as desired */
height:50vh; /* as desired */
border:none;
margin:0px auto
}
</style>
</head>
<body>
<div class="yourcontent">
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
<p>Your website's content preceeds the iframe</p>
</div>
<iframe src="https://www.sitepoint.com/"></iframe>
</body>
</html>