how to remove Iframe border?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gosai jahnvi
    New Member
    • Apr 2019
    • 22

    how to remove Iframe border?

    Code:
    <html>
    <body>
    
    <h2>HTML Iframes</h2>
    <iframe src="https://www.foo.com" height="200" width="500"></iframe>
    
    </body>
    </html>
    Last edited by gits; Jul 3 '19, 06:43 AM. Reason: added code tags and remove url
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you can use the css border property for that
    Last edited by gits; Jul 3 '19, 06:40 AM.

    Comment

    • AjayGohil
      New Member
      • Apr 2019
      • 83

      #3
      try this css for remove border
      Code:
      iframe
      {
          border: 0;
      }

      Comment

      • chanderasrani
        New Member
        • Aug 2019
        • 2

        #4
        Add the frameBorder attribute (note the capital ‘B’).

        So it would look like:

        Code:
        <iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible.</iframe>
        Last edited by gits; Aug 13 '19, 09:31 AM.

        Comment

        • gits
          Recognized Expert Moderator Expert
          • May 2007
          • 5390

          #5
          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.

          Comment

          • parth123
            New Member
            • Sep 2019
            • 4

            #6
            Code:
            <iframe src="URL" width="300" height="300" frameBorder="0">Not working.</iframe>
            Last edited by gits; Sep 9 '19, 10:06 AM. Reason: use code tags

            Comment

            • gits
              Recognized Expert Moderator Expert
              • May 2007
              • 5390

              #7
              what exactly is not working with the shown code?

              Comment

              Working...