View Full Version : Transparencies


Ayla
12-19-2006, 09:22 PM
Hi,

I have a couple questions about Transparencies that are bothering me, mainly because I keep trying things and it doesn't work.

1) How does one get a faded background image? I thought that by putting background: url(free.jpg) in my style (or in my case, embedded css) it would just automatically dull the picture. Or do I have to fade it myself in a graphic program? I can do that, but I thought I the code was suppose to fade it and I just wanted an answer.

2) How do I make text appear on the transparent layer of a textbox or table and retain the background such as this image for "Captivated"? http://b5.boards2go.com/boards/board.cgi?action=read&id=1156697961&user=Fang I've tried applying the exact code this person used, but I'm afraid I don't understand it well enough to use it and I've been working on doing something like this for months and I can't figure it out.

Much thanks for any help,
Ayla

bourdelson
12-20-2006, 03:13 PM
The transparency/fading look you're looking for should be done in an image program. It may be possible using CSS, but it might not look right or work at all in all browsers.

As for your second question, the way they did that was using the chroma filter in a div layer. However, it is unnecessary to do so in a div layer: they naturally have no backgrounds. All you need is a simple div tag to do that. The filter is not necessary. :)

Ayla
12-20-2006, 08:29 PM
Thanks so much. So I would use chrome filter as a style in a div tag? But isn't the scroll bar either a componet of a table or textarea box? Don't I need to use one of them? Would I use the div tag within the table or textarea. My reason for asking is I am trying to have a scrollable textarea like the one in "Captivated" on a background image I'm using on a web page for an organization.

Thanks,
Ayla

bourdelson
12-20-2006, 08:51 PM
No really special codes to get a scrollbar. All you have to do is set a specific width and height for the div, and when there's enough content inside of the div layer, the scrollbar will appear on its own. Also, no, you don't need the chroma filter tag. That's what I was trying to say. Div layers have transparent backgrounds already, so using that filter is redundant.

The div tag is a block-level element and can be used on its own. If you were to put it inside of a text area, then all you would see is coding, and using tables with the div tag would also be unnecessary.

http://www.lissaexplains.com/html7.shtml#divlayerdef

Ayla
12-23-2006, 03:15 PM
Thanks so much for your help. I actually managed it with a textarea tag, but I've definately learned some things I didn't know about Div tags. I thought they were more like span styles. I do have one last question. Let's say I do want to use a chrome...I'm still considering it, because I want fad the background of the textbox without fading the background image. Could you or anyone else give me the exact code to use it? What I have now is: <textarea style="FILTER: Chroma(color=#000000)". But this doesn't seem to work.

Thank you kindly,
Ayla

bourdelson
12-24-2006, 03:48 PM
All that tag does is filter out anything in the text area that is the color black [#000000].

As far as I know, the only fading filter is specific to Internet Explorer, so it won't work or look right in any other browser.

Also, I would suggest using the div instead of a text area, because the text area will allow users to highlight and delete portions of whatever's inside. Even though it doesn't harm anyone else who views it [and you can refresh the page and the text appears fine], it seems like for your purpose, a div would work better. :)

Ayla
12-27-2006, 03:13 PM
Bummer. Well thanks. I'll continue to mess around with it then.