Original Comment:

junx


Posts: 1

Registered:
Oct 2012
Re: Ads Slowing the Site (Score: 0)
posted Wednesday, October 10, 2012 - 05:31 AM (#62168)

An explanation is so much better than a solution!

Most browsers will set a default margin around an HTML document unless it is specified otherwise. The default for your browser may be 10px as you mentioned, I'm using Chromium on Linux and the margin is 8px inside of your iframes at the moment.

Because this is a browser-default behavior, the only solution is to set the css margins inside of the iframes to zero. It's not a problem in the page, but it's as problem that the browser will add to the page unless you specifically say "hang on, don't do that, bro" in the CSS somewhere.

Any variation on adding:

<style type="text/css">
body { margin: 0px; }
</style>

in the document head will work wonderfully.

And yes, it will have to be added from inside the iframe page itself, you can't modify the iframe css from the parent document. :)

Peace!


Locked profile

This discussion has been locked. Feel free to start a new one to share your wisdom with us.

forums

welcome! please login or register.