Question

http://makememodern.com/portfolio/

You will see that I have embedded a website onto the page and that it is aligned to the right side of the page. I would like it to be centered.

<div style="text-align:center">
<iframe style="-webkit-transform: scale(0.7);" src="http://www.stokeswilliams.com" width="100%" height="700px"></iframe>
</div>
Was it helpful?

Solution

You are setting the width of the iframe as 1100px. The div that's wrapping it has a dynamic width.

To solve it, you can set the width of the iframe to match the width of its parent container, by doing this:

iframe {
    width: 100%;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top