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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Input Type Button

Status
Not open for further replies.

Anything991

Programmer
Jul 25, 2002
1
ZA
Hey Can any body help me i wanna give a input type button a style with having to create a class and not only using input because then it changes all the input type and i only want to change the button type!!! I though it may be something like


<style>
Input[type=button]
{

Background-color: red;

}

</style>


But it doesn't seem to work!! Please can anybody help me!!
 
I think that you can use the new <button> element instead of the <input type=&quot;button&quot;>, and then address in in your stylesheet with .button {}
 
You can write it directly in the input line:

EX.
<input type=button style=&quot;background-color: red;&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top