home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Question on formatting text boxes in forms

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1942
Discussions: 200,950, Posts: 2,379,437, Members: 246,311
Old March 2nd, 2005, 05:26 PM   Digg it!   #1 (permalink)
Member
 
Bluesguitar's Avatar
 
Join Date: Jan 2005
Location: NE
Posts: 201
Question
Question on formatting text boxes in forms

Hey, I have a quick question for ya guys! I'm settting up a form on my band's website so people can fill it out and send it to our email address. I have it all working fine but I'm having troubles with formatting the text in the text boxes and on the submit button. The background on our website right now is black and so I'm making the background in the text boxes a dark gray. I can't figure out how to change the text inside the boxes (using CSS) to a color other than black. It's near impossible to read what has been typed the way it is. Thanks in advance for your help.
Bluesguitar is offline   Reply With Quote
Old March 2nd, 2005, 06:04 PM     #2 (permalink)
nuisance since 1968
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: ɐqɟs
Posts: 10,457
You can just use css to define the type of font you want, including it's color, in then assign your input boxes using that class...

define in "style" portion of your html:
.bginput {font-size: 9px; font-family: verdana, arial, helvetica, sans-serif;color: #000000; background-color: #cfcfcf}

use in body to assign that class to your input boxes:
class="bginput"


Example from a web page of mine:

Here's the <style> portion of the page that is within the <head> portion of the document:

----------------------------------------------------------------------
<style type="text/css">
body { background-image: url("bgfade.jpg")}

select {font-family: verdana,arial,helvetica,sans-serif;font-size: 9px;color: #000000;background-color: #cfcfcf}
textarea, .bginput {font-size: 9px; font-family: verdana, arial, helvetica, sans-serif;color: #000000; background-color: #cfcfcf}
a:link, a:visited, a:active {color: #000000; text-decoration: none}
a:hover {color: #0099ff;}
#ltlink a:link, #ltlink a:visited, #ltlink a:active { color: #0000ce;text-decoration: none;}
#ltlink a:hover { color: #ff4400;text-decoration: none;}
.thtcolor {color: #000000;}

Smalltext, .s { font-family: arial, verdana, tahoma; font-size: 8pt; font-weight: normal; color: #000000; text-decoration: none; }
Photobg, .fp { font-family: arial, verdana, tahoma; font-size: 7pt; font-weight: normal; color: #000000; text-decoration: none; background-image: url("findphotosmoz.gif")}
Photobg2, .wl { font-family: arial, verdana, tahoma; font-size: 7pt; font-weight: normal; color: #000000; text-decoration: none; background-image: url("worthlinksmoz.gif");background-repeat: no-repeat;}
</style>

----------------------------------------------------------------------


And here's the <body> portion of the document where inside a <table> I use the <form> command to make my input box. I assign the above defined class of .bginput to the box using class:


----------------------------------------------------------------------



<body>.....
<table>....


<form target="_content" Name="frmName" action="http://www.worth1000.com/usersearch.asp" method="post">
<input type="text" name="txtName"
class="bginput" size="12" value="Find User">
<input type="image" onclick="find_names(txtName);" src="gobutton.gif" alt="Search by Username, E-mail or User ID">
<input type="hidden" name="formName" value="frmName">
<input type="hidden" name="edit" value="2">

</form>

----------------------------------------------------------------------
OuTpaTienT is offline   Reply With Quote
Old March 2nd, 2005, 06:19 PM     #3 (permalink)
Member
 
Bluesguitar's Avatar
 
Join Date: Jan 2005
Location: NE
Posts: 201
Thanks! Worked perfectly. I trying to use 'text-color:' instead of 'color:' I should've figured it out myself... but didn't! Thanks
Bluesguitar is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visio question pea333nut Webmastering and Programming 2 September 3rd, 2004 12:23 PM
Word Formatting Marks ZENYO Applications and Operating Systems 1 February 12th, 2004 03:18 PM
MSWord Text Box problem VERT Applications and Operating Systems 2 November 4th, 2003 12:38 AM
MS Access, how do I make one txt box = another Bob The Great Webmastering and Programming 9 June 18th, 2003 01:42 AM
Access / Automatically generate a report from a form? Turnip12 Webmastering and Programming 22 November 6th, 2002 02:24 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
The disrespect of Obama by Russian .. (33)
Making Health Care Worse (176)
Is It Just Me? (2940)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (7)
radeon x850xt platinum & shader.. (6)
Is the PSU I received dead? (12)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
windows vista security holes (9)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
Point and Shoot Camera Suggestions. (4)
Regular Build (7)
Multiple Restarts Required at Boot (2)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)


All times are GMT -4. The time now is 11:47 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28