Posted by Ben C on 05/18/07 07:15
On 2007-05-18, .rhavin grobert <clqrq@yahoo.de> wrote:
> id like to have the following:
>
><div><p>test</p></div>
>
> with the div having background #000000 and the text having color
> #ff0000, so
>
> div {background-color:#000000;}
> p {color:#ff0000;}
>
> now the problem:
>
> i want to have the div semitransparent like this...
> div {
> background-color:#000000;
> filter:alpha(opacity=77); -moz-opacity:0.77;
> opacity:0.77; -khtml-opacity:0.77;
> }
>
> but i want to have the text at opacity 100%.
>
> any ideas?
>
> thx for any thoughts, .rhavin;)
You need the text in a different element that's not a descendent of the
semi-transparent one, but stacked on top of it. z-index and position:
absolute can be used to achieve this.
See
http://groups.google.co.uk/group/comp.infosystems.www.authoring.stylesheets/browse_thread/thread/daf8300d45a25721/2c7cdcf4107b8d95?hl=en#2c7cdcf4107b8d95
[Back to original message]
|