Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12575

Re: iframe and its background color problem with IE

From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript, comp.infosystems.www.authoring.stylesheets
Subject Re: iframe and its background color problem with IE
Followup-To comp.infosystems.www.authoring.stylesheets
Date 2012-03-10 19:10 +0200
Organization A noiseless patient Spider
Message-ID <jjg1tu$fc5$1@dont-email.me> (permalink)
References <11a7c39d-f0bb-475f-ad81-591d39b5d322@ow8g2000pbc.googlegroups.com>

Cross-posted to 2 groups.

Followups directed to: comp.infosystems.www.authoring.stylesheets

Show all headers | View raw


2012-03-10 18:25, justaguy wrote:

> The following code would render expected results with Firefox (3.6 and
> above), however, with IE 7/8/9
> the background color attribute has no effect, why?  Thanks.
>
> <iframe id="txt" ... style="border:1px solid; background-
> color:#EFF9FC"></iframe>

This is not a JavaScript question; moving discussion to a group on CSS.

The CSS settings for an iframe element are supposed to relate to the 
inline frame box that constitutes part of document where it resides, 
rather than the contents shown in the box. The contents is affected by 
its own style sheet, so set any desired background there.

However, the default background is transparent, and it is more or less 
natural to expect that then the background of the inline frame box 
shines through. Although most browsers have adopted this view, IE has 
not done so before IE 9. If you don't see the background color on IE 9, 
then the reason is that your document is displayed in Quirks Mode; try 
adding <!doctype html> at the very start of the document to see this.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

iframe and its background color problem with IE justaguy <lichunshen84@gmail.com> - 2012-03-10 08:25 -0800
  Re: iframe and its background color problem with IE "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-10 19:10 +0200

csiph-web