Muaz Muaz - 5 months ago 9
CSS Question

White space is still present around the iframe border even after after setting frameborder to 0

Even After setting the frameborder attribute in the iframe to 0 there is still some white space present around the iframe border (unlike the original url/link page). Is there any other way to get rid of the white space or some white must be presented around the iframe as it is within the webpage (or part of it) and it cannot be the whole page? Thank you.

Answer

Maybe that whitespace is actually the outside margin of the document loaded in the <iframe>. Try styling the loaded document with:

html, body {
    border: 0px;
    margin: 0px;
    padding: 0px;
}
Comments