Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Colors 1

Status
Not open for further replies.

mts176

MIS
Apr 17, 2001
109
US
Is there a way to change the color of a button?

I don't want to use an image I just want the background another color besides grey.
 
yup:

Code:
<input type=button style=&quot;color:#ffffff; background:#123456;&quot; value=Colorful>

This is not a bug - it's an undocumented feature...
;-)
 
hi mts176,

Yes you can with adding the style settings (some style settings works in IE, some in NN, some in both):

<INPUT TYPE=&quot;submit&quot; style=&quot;border:none; background-color:yellow; color:red; width:200px; height:40px;&quot; name=&quot;button2&quot; value=&quot;buttonvalue&quot;>

If you leave the style border:none; you will get a non colored border around the button. You also can set other borderd like border:double; or border:groove;

To make the button the same size in NN you have set also the INPUT attribute's width and heigth like:

<INPUT WIDTH=&quot;200&quot; HEIGHT=&quot;40&quot; TYPE=&quot;submit&quot; style=&quot;border:none; background-color:yellow; color:red; width:200px; height:40px;&quot; name=&quot;button2&quot; value=&quot;buttonvalue&quot;>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top