Click to See Complete Forum and Search --> : Fading
GuyWoods
05-14-2003, 12:11 PM
I was wondering if anyone could give me the html code for this:
I would like to have a text box, but have the background faded behind the box, and I have no idea how to do this, any help would be greatly appreciated.
This is actually a DHTML question because it cannot be done with only HTML.
1. You can use CSS and an animated .gif file as the background of the textbox; or
2. You can use JavaScript. Here is an example (changes the text, but you should get the hang of it, if not just ask and I'll help ya): http://jona.t35.com/experiments/xColorChnger.html
GuyWoods
05-15-2003, 10:59 AM
Ya, I'm definitely gonna need some help with this, that link didn't explain a thing! :(
Nevermore
05-15-2003, 11:04 AM
What do you want it to do? e.g. fade, flash, cycle ...
What color do you want the box to fade from and to? (Example: start at white and fade to black.)
My code was meant as an example, by the way (I always say this for clarification so that other people here don't think I was suggesting that my script was the exact need).
Nevermore
05-15-2003, 11:37 AM
If you want to fade from one colour black, try this tutorial: http://www.javascriptkit.com/dhtmltutors/fadingtext.shtml
GuyWoods
05-15-2003, 06:33 PM
nonononononononono, i don't want anything to fade to anything.
I want the background of the page to be faded behind the text box, just be lighter looking so you can see the text in front of the background a little better, because the background is going to be ranging from fairly dark green to a brown, like camouflage.
SniperX
05-16-2003, 12:10 AM
<body bgcolor="dark green">
I think that works
From my understanding of what you are looking for, you can do it in IE with a filter, like this:
<textarea style="filter:alpha(opacity=75);"></textarea>
khalidali63
05-16-2003, 08:47 AM
I think he is only looking for background color,
snipers is closer if I am right..:-)
<body style="background-color:#93BEE2;">
this should do it...
lets se how many "no's" he writes back this time..:D
GuyWoods
05-16-2003, 09:29 PM
nonononononononononononononononononononononononononononononononononononono good enough?!? :D
i think pyro has what i want and thank you, i'll let you know if it turns out good.
GuyWoods
05-21-2003, 01:09 AM
Okay, that is basically what I wanted, but there's always a scroll bar to the right of the text, how do I get rid of that?
<input type="text" name="mytext" style="filter:alpha(opacity=75);" />
GuyWoods
05-21-2003, 09:23 PM
Still having a bit of trouble with it. Sorry, I'm not the greatest at this stuff.
So the line should look like this?:
<input type="text" name="mytext" style="filter:alpha(opacity=75);"/>texttexttexttexttexttexttexttext
like that with the texttexttext being what I would like having the faded background behind it? (if that sentence makes any sense at all)
Thank you for any help you can give.
<input type="text" name="mytext" value="texttexttexttexttexttexttexttext" style="filter:alpha(opacity=75);"/>
GuyWoods
05-21-2003, 10:19 PM
Ya, that's exactly what I want, but you can click on the text and delete it while you're on the webpage
missp
05-22-2003, 12:43 AM
Originally posted by GuyWoods
Okay, that is basically what I wanted, but there's always a scroll bar to the right of the text, how do I get rid of that?
Set the text area parameters:
<textarea name="mytext" cols="350" rows="12" style="filter:alpha(opacity=55);">texttexttexttexttexttexttexttext</textarea>
The number of rows you set will determine whether a scroll bar is needed.
GuyWoods
05-22-2003, 03:11 PM
Okay, thats exactly what I want, but there's still one more problem
<textarea name="mytext" cols="60" rows="12" style="filter:alpha(opacity=75);">blahblah</textarea>
When I set the amount of rows to "1" there is still the arrows of the scrollbar to the right.
Is there anyway to get rid of those completely but only in certain areas?
ALSO!!!
When viewing the webpage, it is still possible to click on the text area, and delete and/or write whatever you want in there.
I would also like to get rid of that if at all possible.
You want no scrollbar in the textarea? Try putting this attribute in the <textarea> tag...
style="overflow:none;"
Nevermore
05-23-2003, 11:49 AM
I suppose you could use CSS to set all the scroll bar atributes to white, so it would be invisible.
Originally posted by Jona
style="overflow:none;"
Should be style="overflow:hidden;", if that is the way that is chosen...
GuyWoods
05-23-2003, 06:05 PM
so I can have style="filter:alpha blah blah and style="overflow:hidden" in the same line?
They won't fustigate with each other?
No you cant do that:
use this
style="filter:alpha blah blah ;overflow:hidden"
GuyWoods
05-23-2003, 07:28 PM
Okay, that solves that problem! Thank you.
BUT!!!!
I still have the problem that when viewing the webpage, people can still click on the textarea, and write in or delete what they see.
How can I stop this?!?
<textarea readonly></textarea>
havik
05-23-2003, 09:08 PM
<textarea disabled> </textarea>
Works as well but the text is displayed differently. I never knew about that 'readonly' but I think I'll start using that from now on. :D
Havik
GuyWoods
05-24-2003, 01:36 AM
YES YES YES, thank you very much!!!!!!!!!!!
very very very very much!