Background image ok in IE6 but not in firefox

Hi people,

I need some help on adding a different background image to 3 different content pages.

I have tried adding an internal css style to each content page which works perfectly in IE6 but the background image is very small and is only half the size in firefox.

Here's the code I added to one of the content pages:

<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">.contentpaneopen{


background-image: url(../GT/templates/JavaBean/images/content/targ_logo.gif);
background-repeat: no-repeat;
background-position: 0px 0px;
background-attachment: fixed;
background-color: transparent;


width: 604px;
height: 435px;
padding: 0px;

display: block;
font-size: 48pt;

text-align: left;



}</style>

Any ideas why FF can't understand the css style? Is there anything I can do to fix it up?

any ideas will be much appreciated.

A:
try getting rid of background-repeat: none;

A:
Thanks for your quick reply. I have deleted the line as suggested and it has definitely helped. FF is showing exactly the same as in IE6. Only now I have the problem of the background tiling. Is there another way to stop the image repeating?

Also, how could I reference the css externally, either to my template or perhaps to another css sheet.

I have tried the following;

<css>
<filename>url(../GT/templates/JavaBean/css/content_css.css);</filename>
</css>

didn't work,

I have also tried;
<LINK href="../GT/templates/JavaBean/css/content_css.css" rel="stylesheet" type="text/css">

but alas it again hasn't worked.

A:
Ok, the following code solved the problem. Not quite sure why, maybe someone could explain it to me.

Nonetheless, in case it can help anyone else the following code was displayed as required in both IE6 and Firefox 1.5.

<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css"><!--
.contentpaneopen{

postition: absolute;
top: npx;
left: npx;
width: npx;
height: npx;
z-index: 1;

background: url(../GT/templates/JavaBean/images/content/targ_logo.gif) no-repeat;


width: 604px;
height: 435px;
padding: 0px;

display: block;
font-size: 48pt;

text-align: left;

}

转载于:https://www.cnblogs.com/kaixin110/archive/2007/08/29/873858.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值