Results 1 to 5 of 5

Thread: Iframe border problems in Fire Fox

  1. #1
    Join Date
    Aug 2009
    Location
    utf-8
    Posts
    205
    Thanks
    4
    Thanked 7 Times in 7 Posts

    Exclamation Iframe border problems in Fire Fox

    So I have an iframe that the border is set to "0".
    Works fine in IE, but Fire Fox keeps puting a border around the iframe even when border="0". Is there any way I can have no border AT ALL?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The 'border' may be arising from something else. To tell for sure, we would need a link to the page:

    Please post a link to the page on your site that contains the problematic code so we can check it out.


    However, you could try:

    HTML Code:
    <iframe style="border: none;" . . . ></iframe>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2009
    Location
    utf-8
    Posts
    205
    Thanks
    4
    Thanked 7 Times in 7 Posts

    Default

    The style that you put in works, thanks!

  4. #4
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Just for future reference, always make things work in Firefox before you do anything with IE... Just as a general rule.

    // X96 \\
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As a side note, frameborder (which will work in all browsers) is the correct attribute for controlling the border of an iframe, not border. It's valid values are 0 or 1. For all other border effects for iframe, use style. Since the default frameborder is 1, that explains what Firefox was doing. Style should always override any corresponding attribute value though, so it is generally safer and easier to go right to style.

    Since iframe is being deprecated, unless that changes, it is unlikely that the non-standard border attribute will be dropped in IE, though it may already have been in IE 8. I may check at some point. Doesn't seem to be a priority, as IE will respond correctly to the border style or to the frameborder attribute.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •