I do not want to inherit the child opacity from the parent in CSS?

Instead of using opacity, set a background-color with rgba, where 'a' is the level of transparency.

Instead of using opacity, set a background-color with rgba, where 'a' is the level of transparency. So instead of: background-color: rgb(0,0,255); opacity: 0.5; use background-color: rgba(0,0,255,0.5).

Another similar solution for background is of course the mighty . Png :) – Madmartigan Apr 24 at 12:04 background-color: rgba(0,0,255,0.5); this code is right, but does not work with ie6 and ie7 – Lion King Apr 24 at 12:10 @Madmartigan Yes, if you want the text in the parent div to have opacity, then you would have to set the opacity of the text with a span. You can use a polyfill to make it backwards compatible, or you can use a png.

– Blowski Apr 24 at 12:10 @LionKing - There are a few ways around it. You can build a 1x1 semi-transparent PNG, then use a conditional comment to set it as the background image on the parent div, and use AlphaImageLoader to make the transparency work. – Blowski Apr 24 at 12:17 @blowski - this way is Cumbersome way – Lion King Apr 24 at 12:23.

The child will always inherit the opacity from its parent. Demo of the first workaround I found: impressivewebs.com/demo-files/css-opacit... All workarounds seem to use relative or absolute positioning to move the translucent (sibling) content underneath the opaque content. Another solution is to explicitly set the opacity of each child element except the one you want fully opaque, and use either .

Png or alpha channel background as @Blowski suggested for the parent element. This means you will need the parent to be a "wrapper" div to all the other elements (no text nodes directly inside the parent).

Opacity is not actually inherited in CSS. It's a post-rendering group transform. In other words, if a has opacity set you render the div and all its kids into a temporary buffer, and then composite that whole buffer into the page with the given opacity setting.

What exactly you want to do here depends on the exact rendering you're looking for, which is not clear from the question.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions