Do something else in Opera

Hi all

I'm using this to create an alpha background in a site.


.alphalayer{
filter: alpha(opacity=0);
-moz-opacity: 0.0;
opacity: 0.0;
}


It works great in IE, NS, Firefox but NOT Opera.

in Opera (and on a MAC I think?) it is just a grey box.

Is there any way of putting some sort of condition in there it tell it to do something else if is opera or on a mac.

Chrisbackground-image: url("back.gif");I think you're missing some Opera proprietary code too. You could use a png instead though. That's what I do.will this is exactly what I'm doing:

css:

#alphabg {
position:absolute;
left:36px;
top:359px;
width:703px;
height:140px;
z-index:4;
background-color: #CFD0CD;
layer-background-color: #CFD0CD;
border: 1px none #000000;
visibility: hidden;
}
.alphalayer{
filter: alpha(opacity=0);
-moz-opacity: 0.0;
opacity: 0.0;
}

javascript:

var val=0;
function fade(){
document.getElementById('alphabg').style.filter='alpha(opacity='+val+')';
document.getElementById('alphabg').style.MozOpacity=val/100;
val++;
if (val<30)setTimeout('fade()',10);
}

HTML:

<body onLoad="fade()">
<div id="alphabg" class="alphalayer"></div>


The grey box is fading in from 0 to an amount that looks good. but in Opera and on a MAC it just shows the grey box at full which looks BAD.

So who could I incorporate a PNG with alpha channel in this process without interfering with the existing fade/alpha that works in the other browsers.

Cheers
ChrisNo takers??????

Anyone else got any ideas?

ChrisOpera doesn't make stuff like that.
 
Back
Top