View Single Post
Old 10-06-2012, 05:46 AM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,491
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
First added css to get a back ground color. Then added an ID so the back ground color knows what to color. Then added onfocus, it could have been an onclick, to change the color via a javascript command. I only added it to the first input.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
#name, #ip, #port{
	background-color: SlateGray;
}
</style>
</head>
<body>
<input id="name" onfocus="this.style.backgroundColor='silver';" name="name" value="Server Name" /><br />
<input id="ip" name="ip" value="Server IP" /><br />
<input id="port" name="port" value="Server Port" />
</body>
</html>
sunfighter is offline   Reply With Quote