{"id":1813,"date":"2017-03-23T11:16:12","date_gmt":"2017-03-23T05:46:12","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=1813"},"modified":"2017-03-28T18:28:08","modified_gmt":"2017-03-28T12:58:08","slug":"remove-border-from-iframe","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/remove-border-from-iframe\/","title":{"rendered":"[ Solved &#8211; 11 Answers ] HTML &#8211; Remove border from IFrame"},"content":{"rendered":"<p><label class=\"label label-Warning\">PROBLEM :<\/label><\/p>\n<p>How to remove the border from an iframe embedded in web app? An example of the iframe is:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;myURL&quot; width=&quot;300&quot; height=&quot;300&quot;&gt;Browser \t\t\tnot compatible.&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]\n<p><label class=\"label label-info\">SOLUTION 1:<\/label><\/p>\n<p>Add the frameBorder attribute (note the capital \u2018B\u2019).<\/p>\n<p>So it would look like:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;myURL&quot; width=&quot;300&quot; height=&quot;300&quot; frameBorder=&quot;0&quot;&gt;Browser not compatible.&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 2:<\/label><\/p>\n<p>You have to set the frameBorder attribute with a capital B.<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe frameBorder=&quot;0&quot; &gt;&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 3:<\/label><\/p>\n<p>In addition to adding the frameBorder attribute you might want to consider setting the scrolling attribute to &#8220;no&#8221; to prevent scrollbars from appearing.<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;myURL&quot; width=&quot;300&quot; height=&quot;300&quot; frameBorder=&quot;0&quot; scrolling=&quot;no&quot;&gt;Browser not compatible. &lt;\/iframe &gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 4:<\/label><\/p>\n<p>Using the &#8220;border&#8221; CSS attribute works as well:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;wikitest.html&quot; style=&quot;width: 100%; height: 400px; border:0&quot;&gt;&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p>Note CSS border property does not achieve the desired results in IE6, 7 or 8.<\/p>\n<p><label class=\"label label-info\">SOLUTION 5:<\/label><\/p>\n<p>For browser specific issues also add frameborder=&#8221;0&#8243; hspace=&#8221;0&#8243; vspace=&#8221;0&#8243; marginheight=&#8221;0&#8243; marginwidth=&#8221;0&#8243; according to Dreamweaver:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;wikitest.html&quot; name=&quot;banner&quot; width=&quot;300&quot; marginwidth=&quot;0&quot; height=&quot;300&quot; marginheight=&quot;0&quot; align=&quot;top&quot; scrolling=&quot;No&quot; frameborder=&quot;0&quot; hspace=&quot;0&quot; vspace=&quot;0&quot;&gt;Browser not compatible. &lt;\/iframe&gt;<\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]\n<p><label class=\"label label-info\">SOLUTION 6:<\/label><\/p>\n<p>If the doctype of the page we are placing the iframe on is HTML5 then we can use the seamless attribute like:<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;...&quot; seamless=&quot;seamless&quot;&gt;&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 7:<\/label><\/p>\n<p>Add the frameBorder attribute (Capital \u2018B\u2019).<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;myURL&quot; width=&quot;300&quot; height=&quot;300&quot; frameBorder=&quot;0&quot;&gt;Browser not compatible. &lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 8:<\/label><\/p>\n<p>Add the frameBorder attribute. It\u2019s case-sensitive<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;iframe.php&quot; width=&quot;300&quot; height=&quot;300&quot; frameBorder=&quot;0&quot; scrolling=&quot;no&quot;&gt;Browser not compatible&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 9:<\/label><\/p>\n<p>Add the frameBorder attribute below to the iFrame tag<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;http:\/\/google.com&quot; frameBorder=&quot;0&quot;&gt;&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n<p><label class=\"label label-info\">SOLUTION 10:<\/label><\/p>\n<p>In your stylesheet add<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Css Code<\/span> <\/div> <pre class=\"language-css code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-css code-embed-code\">{<br\/>  padding:0px;<br\/>  margin:0px;<br\/>  border: 0px<br\/><br\/>}<\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]\n<p><label class=\"label label-info\">SOLUTION 11:<\/label><\/p>\n<p>Style property can be used For HTML5 if we want to remove the border of the frame or anything that can use the style property. as given below<\/p>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <span class=\"code-embed-name\">Html Code<\/span> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;iframe src=&quot;demo.htm&quot; style=&quot;border:none;&quot;&gt;&lt;\/iframe&gt;<\/code><\/pre> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>PROBLEM : How to remove the border from an iframe embedded in web app? An example of the iframe is: [ad type=&#8221;banner&#8221;] SOLUTION 1: Add the frameBorder attribute (note the capital \u2018B\u2019). So it would look like: SOLUTION 2: You have to set the frameBorder attribute with a capital B. SOLUTION 3: In addition to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[3863,3866,3864,3860,3862,3873,3869,3872,3871,3874,3870,3868,3861,3865,3867],"class_list":["post-1813","post","type-post","status-publish","format-standard","hentry","category-html","tag-how-do-i-get-rid-of-an-iframe-border","tag-how-to-remove-an-iframe-border-in-ie8","tag-how-to-style-iframes-with-css","tag-html-competely-removing-an-border","tag-html-iframe-frameborder-attribute","tag-iframe-border-color","tag-iframe-border-css","tag-iframe-frameborder-css","tag-iframe-no-border-full-page","tag-iframe-no-border-html5","tag-iframe-no-scroll","tag-iframe-remove-border-and-padding","tag-javascript-iframe-without-border-and-scroll-in-popup","tag-remove-border-from-iframe","tag-remove-iframe-scrollbar"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=1813"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1813\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=1813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=1813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=1813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}