how to remove border from iframe in HTML?

How can I remove the border from iframe using HTML or CSS?

Suppose this is my iframe

<iframe src="url"  width="500"   height="300">text here</iframe>

as I would like to show this iframe in my web-page, which has different website URL, without the border it would look better and should match my website background color, so it can look like my websites webpage only


Asked by:- Vinnu
: 324 At:- 9/14/2017 2:00:41 PM
html css iframe-border

1 Answers
profileImage Answered by:- jaiprakash

You can easily do it using frameborder attribute of iframe, like code below

<iframe src="url" width="200" height="200" frameborder="0">
<p>Your browser does not support iframes.</p>

to make it work in all browsers including IE6 you can use  frameBorder attribute ('B' is capital)

<iframe src="myURL" width="300" height="300" frameBorder="0" scrolling="no">Browser not compatible. </iframe >

Note: use frameBorder (cap B) for IE, otherwise will not work. But, the iframe frameborder attribute is not supported in HTML5. So, Use CSS instead.

<iframe src="url" width="200" height="200" style="border:0">

you can also remove scrolling using scrolling attribute

<iframe src="" width="200" height="200" scrolling="no" style="border:0">

Also, you can use seamless attribute which is new in HTML5. The seamless attribute of the iframe tag is only supported in Opera, Chrome, and Safari.

At:- 9/15/2017 3:39:27 PM
Thanks, good answer 0
By : Vinnu - at :- 9/21/2017 8:30:32 AM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use