Does anyone know how to have a backgroud color and change the text on a standard form box? I'm looking to have a form like the "forum jump" on this page, but I would like to change the attributes. Any help or resources would be much appreciated.
Printable View
Does anyone know how to have a backgroud color and change the text on a standard form box? I'm looking to have a form like the "forum jump" on this page, but I would like to change the attributes. Any help or resources would be much appreciated.
Do you mean something like the drop down menu on http://www.dynamicdrive.com ??
If so just view the source and you should see how it's done.
Hope this helps :)
rgds,
Actually there will be a tip in the SitePoint tipfeed (see the left middle part of your screen when you access SitePoint's front page) on precisely this topic very soon. Let me pull it out for you :
"HTML 4.0 and style sheets (CSS) now offer you the opportunity to colorize your dull HTML forms and input boxes. Write a tag like :
<INPUT type="text" STYLE="color: #FFFFFF; font-family: Verdana, Comic Sans MS; font-weight: italics; font-size: 14px; background-color: #FFCC00;" size="10" maxlength="60">
NB : this will work in IE only, such is the lack of capability in Netscape."
So essentially you use style sheet properties and assign it to the appropriate tag.
Hope this gives you some sort of idea... ;)
Thanks for the help. I figured it out just by playing with styles for all the tags. It is actually supported better by Netscape 6 (go figure!!). You can specify different option classes and format the text in any different way. IE will only let you change the color of the text with classes. You can see here http://shyness.jaggedknife.com View it with IE and then with NS 6 and notice that "Forums" in the menu is bold in NS 6 and not in IE. I must say, that is the first time I've seen anything supported better by Netscape. Feel free to snag my style sheet for that site. http://shyness.jaggedknife.com/shyness.css
Just for reference, does anyone know if you can specify a background picture for an option menu? I know it can be done with a text box...but for a drop-down menu? I tried the {background:url(pic.gif)} style but no go.
<over&>
</out>
NS6 has more support for W3C standards then IE 5/5.5. IE 5 has better support then NS4.x. Did you try looking at your forms in NS4.x?Quote:
Originally posted by cckrocks
Thanks for the help. I figured it out just by playing with styles for all the tags. It is actually supported better by Netscape 6 (go figure!!). You can specify different option classes and format the text in any different way. IE will only let you change the color of the text with classes. You can see here http://shyness.jaggedknife.com View it with IE and then with NS 6 and notice that "Forums" in the menu is bold in NS 6 and not in IE. I must say, that is the first time I've seen anything supported better by Netscape. Feel free to snag my style sheet for that site. http://shyness.jaggedknife.com/shyness.css
Yes, I did view the form in NS 4.05, it is still functional, just loses the color/font formatting.