By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,062 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,062 IT Pros & Developers. It's quick & easy.

how to remove Iframe border?

P: 22
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3.  
  4. <h2>HTML Iframes</h2>
  5. <iframe src="https://www.foo.com" height="200" width="500"></iframe>
  6.  
  7. </body>
  8. </html>
Jul 3 '19 #1
Share this Question
Share on Google+
6 Replies


gits
Expert Mod 5K+
P: 5,330
you can use the css border property for that
Jul 3 '19 #2

P: 18
try this css for remove border
Expand|Select|Wrap|Line Numbers
  1. iframe
  2. {
  3.     border: 0;
  4. }
Jul 10 '19 #3

P: 2
Add the frameBorder attribute (note the capital B).

So it would look like:

Expand|Select|Wrap|Line Numbers
  1. <iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible.</iframe>
Aug 13 '19 #4

gits
Expert Mod 5K+
P: 5,330
the capital B in the frameborder attribute is not needed nor is it standard compliant. html attribute's names are usually all lower case. its even good practice to not use that at all and handle any styling of elements with css.
Aug 13 '19 #5

P: 4
Expand|Select|Wrap|Line Numbers
  1. <iframe src="URL" width="300" height="300" frameBorder="0">Not working.</iframe>
Sep 9 '19 #6

gits
Expert Mod 5K+
P: 5,330
what exactly is not working with the shown code?
Sep 9 '19 #7

Post your reply

Sign in to post your reply or Sign up for a free account.