SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IFRAME border control in IE

    Hello,

    I try to get rid of an IFRAME border with IE. I can do that with HTML (frameborder="0"), but cannot achieve the same result using CSS.

    Your help would be greatly appreciated. Thanks.

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apparently you don't define the border using CSS for frames:
    http://www.w3.org/TR/html401/present/frames.html#h-16.5

    You simply define the frameborder attribute inline (inside he iframe tag).
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's right, and this is what I do (specifying the attribute inline). But the thing is that Mozilla accepts the CSS "border:0"; I thought that there may also be a CSS workaround with IE...

    Thanks!!

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mozilla allows you to set the borderwidth of an iframe? I believe that you can give it a border via CSS, but can you take away the built in border with CSS as well? Do you have some code?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mozilla doesn't allow to set the width of the border; I can only control whether the border exists or not.

    Here is the code:
    Code:
    <html>
    <head>
    	<title>Untitled</title>
    	<style>
    	/* Mozilla->  css border:0  --  IE6-> <iframe... frameborder="0"...> !!! */
    	iframe {border:0}
    	
    	</style>
    	
    </head>
    
    <body>
    <br><br><br><br><br>
    <iframe src="magickFrame.html" width="400" height="150" id="magickFrame"></iframe>
    
    
    </body>
    </html>
    Set border to 0 for no border, or any other integer for the regular border.


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
  •