[jQuery] Re: need help with opacity

2008-09-04 Thread Cybernoxa

In addition to my previous words:
every element which is within other element which has opacity lower
then 1 will inherit its parent's opacity.

For example if you place paragraph in div with opacity: 0.7, the
paragraph will have the same (even if you give him opacity: 1)

 http://www.twinhelix.com/css/iepngfix/
The solutions from Turbodurso are OK, but I do not use JS for IE, I'm
quite sure we can ignore IE 5, just focus on IE6 and higher


So lets say this is the code:

div id=transpBg
pSome text/p
/div

normal css (even for IE 6)
#transpBg { background: transparent url(transp.png); }

css for ie 6 (in special stylesheet or star hack)
#transpBg {
background: none !important; /* necessary */
filter:
progid:DXImageTransform.Microsoft.AlphaImageLoader(src=transp.png,
sizingMethod=crop);
/* check dependences between sizing method and how it shows pics */
z-index: 1;
/* has Layout fix - there are some ways to do it this is one of them
*/
}


But I'm sure you know it now, just wanted to help in case if you
don't :)
Tom


[jQuery] Re: need help with opacity

2008-09-02 Thread Cybernoxa



 div
         img src=photo.jpg /
 /div

 and I'm doing a simple css thing to control theopacity:

 $(div).css({opacity: 0.11});

Hi Bob - sorry for my english ;)
As img is a child of div it takes the opacity from it's parent, so
there's nothing you can do.
When you set opacity: 1 for img it just mean that it has the same
opacity as its parent (11%).

The only thing you can do IMHO is to place the img outside the div and
position it into right place.

I hope I helped ;)
Tom