开发者

iFrame background image problem on IE8

开发者 https://www.devze.com 2022-12-11 01:07 出处:网络
Hi i am trying since so long for background image on iframe its working fine on firefox and other browsers but s开发者_如何学JAVAerious problem i am facing on IE. Its showing nothing on IE. Pls help m

Hi i am trying since so long for background image on iframe its working fine on firefox and other browsers but s开发者_如何学JAVAerious problem i am facing on IE. Its showing nothing on IE. Pls help me out. Here is my code: I am using IE8.

<iframe scrolling="auto" frameborder="0" allowtransparency="true"  name="main" style="width:100%;height:90%; background-image:url(img/bg2.jpg)"> </iframe>


Apply the background to the page you are loading inside the iframe


Not sure what's going on, but a couple things you could try are:

  1. Add clear: both; to your css
  2. Insert a div that contains everything within the iFrame and set the background on that.


tyr this:

<iframe scrolling="auto" src="img/bg1.jpg" frameborder="0" allowtransparency="true"  name="main" style="width:100%;height:90%;"> </iframe>

I have putted image in src attribute now its working fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号