# Default button / submit class

**URL:** <https://www.ruby-forum.com/t/default-button-submit-class/103728>\
**Category:** Rails\
**Created:** [May 9, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/default-button-submit-class/103728 "2007-05-09T19:10:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmarkow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@dmarkow](https://www.ruby-forum.com/u/dmarkow)\
**Post date:** [May 9, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/default-button-submit-class/103728/1 "2007-05-09T19:10:14Z")

</div>

Is there a way to set a default class to all or elements? I know rails has a way to do this for other  
fields, such as  
ActionView::Helpers::InstanceTag::DEFAULT\_FIELD\_OPTIONS = { “class” =\>  
“text” }. However I haven’t found anything like this for  
buttons/submits.

I know I can add something like input[type=“submit”] { … } to my CSS,  
but this won’t work for Internet Explorer.

It just doesn’t seem very DRY that I should have to add a :class =\>  
“button” to every single button on my site.
