Page 1 of 1

Re: Internet Sodding Explorer

Posted: Thu 10 Jan, 2013 12.00
by WillPS
add

Code: Select all

allowTransparency="true"
to the parameters of the iFrame and

Code: Select all

<body style="background:transparent">
to the body tag of the page you are including in the iFrame

Re: Internet Sodding Explorer

Posted: Thu 10 Jan, 2013 14.18
by dosxuk
The question is, should <iframe>s be transparent by default?

If we look at the standards, here's what the W3C have to say in HTML4.01
16.5 Inline frames: the IFRAME element

Code: Select all

<!ELEMENT IFRAME - - (%flow;)*         -- inline subwindow -->
<!ATTLIST IFRAME
  %coreattrs;                          -- id, class, style, title --
  longdesc    %URI;          #IMPLIED  -- link to long description
                                          (complements title) --
  name        CDATA          #IMPLIED  -- name of frame for targetting --
  src         %URI;          #IMPLIED  -- source of frame content --
  frameborder (1|0)          1         -- request frame borders? --
  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
  height      %Length;       #IMPLIED  -- frame height --
  width       %Length;       #IMPLIED  -- frame width --
  >
Attribute definitions

longdesc = uri [CT]
This attribute specifies a link to a long description of the frame. This description should supplement the short description provided using the title attribute, and is particularly useful for non-visual user agents.
name = cdata [CI]
This attribute assigns a name to the current frame. This name may be used as the target of subsequent links.
width = length [CN]
The width of the inline frame.
height = length [CN]
The height of the inline frame.
Attributes defined elsewhere

id, class (document-wide identifiers)
title (element title)
style (inline style information)
name, src, frameborder, marginwidth, marginheight, scrolling (frame controls and decoration)
align (alignment)
The IFRAME element allows authors to insert a frame within a block of text. Inserting an inline frame within a section of text is much like inserting an object via the OBJECT element: they both allow you to insert an HTML document in the middle of another, they may both be aligned with surrounding text, etc.
The information to be inserted inline is designated by the src attribute of this element. The contents of the IFRAME element, on the other hand, should only be displayed by user agents that do not support frames or are configured not to display frames.

For user agents that support frames, the following example will place an inline frame surrounded by a border in the middle of the text.

Code: Select all

  <IFRAME src="foo.html" width="400" height="500"
             scrolling="auto" frameborder="1">
  [Your user agent does not support frames or is currently configured
  not to display frames. However, you may visit
  <A href="foo.html">the related document.</A>]
  </IFRAME>

Inline frames may not be resized (and thus, they do not take the noresize attribute).
If we look at the current draft for HTML5, again, no mention of transparency.

So who's right?

Re: Internet Sodding Explorer

Posted: Thu 10 Jan, 2013 14.29
by WillPS
I don't know - but the "allowTransparency" parameter is not standard so either way IE is a bag of rotten rhubarb.

Re: Internet Sodding Explorer

Posted: Thu 10 Jan, 2013 16.16
by dosxuk
WillPS wrote:I don't know - but the "allowTransparency" parameter is not standard so either way IE is a bag of rotten rhubarb.
All of the mixed case attributes seem to date from when MS was trying to kill off Netscape, and back in those days it was impossible to have a transparent IFrame, as everybody implemented them as a plugin as a seperate window handle (same problem as <select> tags not being z-index-able). Annoyingly back then there wasn't a standard (formal or otherwise) for vendor extensions to the protocols, which meant lots of fudging. These days it would probably only be implemented as a CSS attribute e.g. "-ms-allow-transparency".

I'm not trying to defend IE, but it does get a lot of stick for it's doing things differently being "against the standards", when many of them are not actually covered by standards.

Re: Internet Sodding Explorer

Posted: Thu 10 Jan, 2013 16.50
by Lorns
And that's why you ask on metropol not facebook. I saw ur update on facebook, and the jellybean status. I initially thought u was nicking your daughters sweeties lol