CSS - Opaque text on low opacity div?

Set the opacity on the background rather than the element.

Set the opacity on the background rather than the element. Background-color: rgba(255,0,0,0.6); A while ago I wrote about how to achieve this in a backwards compatible way.

The opacity applies to the whole div and all of its children. Unfortunately, you cannot undo that opacity, but only add more. And besides that, there's no way for CSS to select the text inside an element.In your case, the best solution is to apply a transparent background image (with PNG) to your div block, like a white one pixel image with 60% opacity.

Another solution would be to use different boxes and positioning, like described in this tutorial by Steven York.

This should answer just about all of your questions: css-tricks.com/non-transparent-elements-....

The simplest solution would be to create a semi-transparent PNG with the correct colour and use that as a background image. Another solution that may be possible depending on your layout is to put the text in a separate layer and position that over the top of the semi-transparent part. Something like this would work: The text to go on top You'd need to add your own positions/sizes (the top, left, width and height properties) as appropriate.

The RGBA solution is really simple! Too bad it doesn't work in IE7, I love the idea of a one-line CSS solution. For now I'll have to settle for my old clunky way with divs and quite a bit of CSS.

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