neex1233 Posted September 12, 2009 Share Posted September 12, 2009 I would like the following code to apply to all of the buttons on my page without having to use the class="button". The code: input:button { color:#050; font: bold 84% 'trebuchet ms',helvetica,sans-serif; background-color:#fed; border: 1px solid; border-color: #696 #363 #363 #696; } Thanks. Quote Link to comment Share on other sites More sharing options...
saltedm8 Posted September 12, 2009 Share Posted September 12, 2009 by that do you mean that you only want the button styled, or do you want the forms styled as well ? if you want all the form styled like the button, you can use input { color:#050; font: bold 84% 'trebuchet ms',helvetica,sans-serif; background-color:#fed; border: 1px solid; border-color: #696 #363 #363 #696; } either that or you could use something like the <p> or <em> etc tags like this to be more specific to the form button p input { color:#050; font: bold 84% 'trebuchet ms',helvetica,sans-serif; background-color:#fed; border: 1px solid; border-color: #696 #363 #363 #696; } <p><input name="" type="button" /></p> but in all honesty. I cannt think offhand of any good reason why someone would not want to use a class when it makes it easier on you, I can virtually guarantee one thing, how I have shown you there is quite possibly the only way to avoid a class as the 'type' cannot be referenced in the css unfortunately ( I could be wrong, but im sure im not ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.