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
  • 34,046
  • 53
  • 137
  • 200

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
  • 44,700
  • 57
  • 210
  • 307
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
  • 112,730
  • 33
  • 157
  • 176