Successfully removing the <iframe> border

Does anyone know how to completely remove the iframe border? I am using Firefox 3.x and the iframe is set to fully occupy the browser window - height="100%" width="100%"

I already set frameBorder="0" and scrolling="no" , but there is some space left on the border between the window and the iframe. Is there a problem with 100% width and height? Do I need to set more than 100%? How much?

+7
html css
source share
6 answers

Do you mean margin / addition?

Your iframe is displayed in the html file, try the following CSS:

 body { margin: 0; padding 0; } 

edit: It could also be similar for your iframe element itself. If the above doesn't work, in the parent html page try:

 iframe { padding: 0; margin: 0; } 
+7
source share

This worked for me by disabling the border with iframe tags:

 iframe { border:none; } 
+5
source share

It worked ...

 iframe { border:none; } 
+3
source share
 <style> html,body, div, iframe{ height: 100%; overflow: hidden; margin: 0; padding: 0; } </style> <iframe src="http://www.cnn.com" frameborder="no"></iframe> 

see http://api.fatherstorm.com/test/4159620.php for an example

+2
source share
 hspace="0" vspace="0" marginHeight = "0" marginWidth = "0" scrolling= "no" frameBorder="0" allowtransparency="true" 
0
source share

I use border: none; to fix this problem in Firefox.

-one
source share

All Articles