Previous Message
Next Message

80% opacity of only background and not of text

Sent by Larry Israel on 6 February 2005 21:09


> The desired result: To get a semi-transparent background of a <div> (or
> other element, especially list elements) and yet keep the 100% opacity
> of the inner text.

You could use PNG images, tho IE doesn't support semi-transparency.
Instead, you can probably achieve what you want using an old-fashioned
transparent GIF, with only *some* of the pixels made transparent.

Yesterday, Bryce Fields posted about this (subject: trasparency of a table):
> However, you can create opacity affects using gifs that are checkered
> w/ transparent pixels that will work for everyone.   (See the left
> menu at http://www.benmeadowcroft.com/webdev/csstemplates/3-column.html
> for an example of the checkered .gif transparency.)

I'm sure there is more info at many URLs, tho I don't have one handy. But
it's a pretty easy technique to understand.

> After several attempts and some research saying that it couldn't be
> done (but lots of "undoable" things have been done by our admins...
> thanks guys) I am coming to the list having done my homework, but not
> getting the results I need purely with CSS. I have found a way to
> emulate this by way of PHP and overlaying two different <div>s with the
> same content from PHP variables, yet pure CSS is my goal. Thanks guys!

Sorry, but it makes no sense that PHP can do anything other than generate
the (HTML & CSS) code that gets delivered to web browsers. PHP runs on
your web server. Unlike JavaScript, it is not a client-side language; it's
not interpreted by web browsers. Whatever your HTML & CSS code consists of
(whether created via PHP or some other means), apparently, that's your
answer.

Larry
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: