Click to See Complete Forum and Search --> : use alpha filter/opacity on background image?


Bigjohn
02-04-2004, 01:24 PM
If i attach a background image to a DIV, is there a way to 'fade' it out with CSS? I saw the thread on alpha filtering divs (threadid=21123)...but cant seem to figure out how to make that work...

John

Bigjohn
02-06-2004, 06:08 AM
I guess I'd better post some of the CSS / HTML for you guys to look at, eh?

I added these styles in my CSS:

#bodyblock {
position:relative;
background: #dcdcdc; background-image: url('../images/joe-birds1.jpg');
background-repeat: no-repeat;
background-attachment:scroll;
color: #333333;
width:650px;
padding:0;
}


.opaque {filter: alpha(opacity=50); -moz-opacity: .5;}
.normal {position:relative;-moz-opacity:1;}


Then in the HTML:


<div id="outer">
<div id="hdr" align="center"></div>
<div id="bar">_<span style="padding:5px;font-size:11px;"></span></div>
<div id="bodyblock" class="opaque" align="right">
<div id="l-col" class="normal" align="center">
<h4 align="center">Menu</h4>
<div id="menuv" class="normal" style="width:50px">
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div></div>
<div id="cont" class="normal">
<span style="position:relative">
<h3 align="center">Two Column Fixed Width with Header &amp;
Footer</h3>


Note - code is trucated. I'm trying to modify a stylesheet borrowed from the ssi-developer.net site - a great 2 column stylesheet with header and footer...

Please advise!

John

Bigjohn
02-06-2004, 01:17 PM
bump! anyone? Please? Don't tell me I need to wash out the graphic in my photo-program.... then I'll need multiple copies of lots of graphics all over the place... ARRGH.

John

ray326
02-06-2004, 02:36 PM
AFAIK "filter" is not part of the current CSS.

Bigjohn
02-06-2004, 07:42 PM
check out the thread I referenced in my first post!

John

ray326
02-06-2004, 11:30 PM
You left out the styling class.

Bigjohn
02-10-2004, 04:39 PM
i included the content of the styling class in the other class... is that why its not working?

John

Paul Jr
02-10-2004, 06:27 PM
I just did a google search and came up with this link (http://msdn.microsoft.com/workshop/author/filter/filters.asp) you might find useful.

ray326
02-10-2004, 10:49 PM
I'm not sure what's going on here but it really screws up on the newer Geckos.