views:

344

answers:

1

Aloha,

currently my pligg template have following Iframe code :

<iframe height="0px;" width="0px;" frameborder="0" name="story_status"></iframe>

Its working fine on firefox, however on chrome, it display as white box..

after inspecting,

<iframe height="0px;" width="0px;" frameborder="0" name="story_status">
<html><head></head><body></body></html>
</iframe>

body have margin: 8px;

EDIT : [ view this on chrome & firefox, u can notice white box on chrome ]

<html>
<head><style>html, body {
    margin: 0;
}
</style>
</head>
<body style="background : #000; color: #fff;">
aaaaa<iframe height="0px;" width="0px;" frameborder="0" name="story_status"></iframe>bbbbb
aaaaaaaaa
</body>
</html>

Is there anyway to remove margin 8px as it display as white box on chrome?

thank you for help

A: 

Add the following CSS rule in the <iframe>:

html, body {
    margin: 0;
}

Alternatively, try adding the following CSS rule to the parent page (which contains the <iframe>):

iframe {
    margin: 0;
    padding: 0;
}
SLaks
its there, not working. any other suggestion?
BulletPandi
Please show us a demo.
SLaks
Hi, i have edited my post, paste that on a html file and view on chrome.
BulletPandi
You need to add that CSS rule to the page in the `<iframe>`.
SLaks
still same, not working..the iframe is : <iframe height="0px;" width="0px;" frameborder="0" name="story_status"></iframe>after inspected = chrome, inspect element.
BulletPandi
I'm having the same problem. I'm playing with "visibility: hidden" and javascript. It works.
LatinSuD