0

Possible Duplicate:
how to not apply opacity for child element?

Is it possible with css or jquery to apply transparency/opacity to an element and not have that affect child elements?

Community
  • 1
  • 1
Marty Wallace
  • 31,458
  • 53
  • 132
  • 196

2 Answers2

2

Maybe you will want to set the background opacity

/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0);
/* RGBa with 0.6 opacity */
background: rgba(0, 0, 0, 0.6);

Check out this blog for further support

Pierre de LESPINAY
  • 42,450
  • 54
  • 205
  • 294
1

No, transparency is inherited, but you can use RGBA (alpha channel) instead.

A good example & tutorial: http://css-tricks.com/rgba-browser-support/

Diodeus - James MacFarlane
  • 110,221
  • 32
  • 151
  • 174