English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Ok, so I'm adding a simple form to my site..

I have it up, its working beautifully!
I just want to make some visual changes...

So...how do I create a text box that has the value inside of it?

Meaning, if I had a question in my form asking for email address, how do I make it so it says email address already typed into the text box, instead of outside?

2006-06-29 14:41:43 · 4 answers · asked by Babumoshai 4 in Computers & Internet Programming & Design

And secondly,

How do i change the colors/font of the text inside of a form text box?

2006-06-29 15:47:36 · update #1

4 answers

Very easy...



The problem is that in this way it will make the filling of the form a real PAIN! For each field the user must fill he'll have to select the initial text, delete it and write what he had to write.

To avoid this use a little Javascript trick:




For the second question... CSS is the best way to do it.
Read this short tutorial and you'll start loving CSS:
www.webcredible.co.uk/user-friendly-resources/css/css-forms.shtml

Good luck and have fun :-)

2006-06-29 19:08:28 · answer #1 · answered by dan_zzz2000 2 · 5 3

If you've got a form and it's a got a field and you want the user to put some text in it to show how many oranges they've peeled, then I guess you can just make that tag an . Yeah, that'll make the form so that the user can type one line of text on it. It'll be blank, like you have found. My name isn't Frank, and I'm running this song into the ground. But if you wanna put something else in the text field when the person loads the form in their favorite browser, then you better use the attribute named "value". Just say: value="some text"

You can hear this at: http://noise.dillfrog.com/audio/aawwtf/htmlquestionwhenmakingaform.mp3 but you probably won't want to. ;-)

2006-06-29 18:02:11 · answer #2 · answered by The Singing Answerman 2 · 0 0

for the second half of your question, use the style="color:red" inside the text box (replace red with the color/hex value you prefer)

2006-06-29 16:35:09 · answer #3 · answered by John J 6 · 0 0

You could use the attribute "Value" to display a default value on your textbox.

2006-06-29 14:47:36 · answer #4 · answered by Jamie Janiero 1 · 0 0

fedest.com, questions and answers