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.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
Frederic's proposal solved my problem: howto get rid off the white border in a fullscreen slideshow for safari browser. Perfect! Many thanks, wimsch [Since I couldn't add a comment on his answer [[< 50]]: I put it here to let him know my gratitude]
Simply add
style="margin: 0 0 0 0"
inside<iframe >
tag.example:
<iframe src="http://www.yahoo.com" style="margin: 0 0 0 0"></iframe>
If you want margin, you must add 'px' after number
(Thanks to "Inspect Element" tool of Safari Browser) this solved my solution.
I ran into a similar problem: I had the iframe inside a
figure
tag, and there was some white space between the iframe and thefigcaption
element.In my case simply adding
iframe { display:block }
solved the issue.Apply below to iframe
Maybe that whitespace is actually the outside margin of the document loaded in the
<iframe>
. Try styling the loaded document with:try this