Opacity is inherited through the children... There are many ways to not have it happen - the easiest way is to create a transparent .png and use it - but it relies that you have fixed the ie6 png bug...
Other ways are to float things so they sit behind content but are not actualy thier parent Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "Stefan Frede" <[email protected]> To: <[email protected]> Sent: Wednesday, December 02, 2009 12:09 PM Subject: [Proto-Scripty] Prototype and opacity > Hi! > > I've got a problem with the opacity setting in prototype. When I set an > elements opacity through prototype every child element inherits this > opacity setting and I didn't find a way to reset it. Here is my code how I > tried it and how it is not working: > > ========== > > <div class="parent"> > <div class="child"> > Lorem ipsum dolor... > </div> > </div> > > <script type="text/javascript" charset="utf-8"> > /* <![CDATA[ */ > $$('div.parent').first().setStyle({ > backgroundColor: '#000000', > opacity: 0.5 > }); > > $$('div.child').first().setStyle({ > backgroundColor: '#ffffff', > opacity: 1 > }); > /* ]]> */ > </script> > > ========== > > Can someone please help and tell me how I can reset the opacity of the > child elements back to normal? > > Thanks in advance. > > Regards, > Stefan > > -- > > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
