# Multiple custom CSS for Formtastic

**URL:** <https://www.ruby-forum.com/t/multiple-custom-css-for-formtastic/203484>\
**Category:** Rails\
**Created:** [February 21, 2011, 2:53pm UTC](https://www.ruby-forum.com/t/multiple-custom-css-for-formtastic/203484 "2011-02-21T14:53:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 21, 2011, 2:53pm UTC](https://www.ruby-forum.com/t/multiple-custom-css-for-formtastic/203484/1 "2011-02-21T14:53:12Z")

</div>

Inside stylesheets I have formtastic.css and formtastic\_changes.css.  
In formtastic\_changes.css I have a custom with:

form.formtastic { width: 700px; etc…

It is working ok but now in only one page only, need a narrower form,  
say 530. So I need to have two width set up.

What is the best way to do this? I mean I do not want to change the  
other forms in the project, I just want to change the width of only  
one new form.

Thank you

---

<div class="post-metadata">

**Author:** ![arigo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@arigo](https://www.ruby-forum.com/u/arigo)\
**Post date:** [February 23, 2011, 8:23pm UTC](https://www.ruby-forum.com/t/multiple-custom-css-for-formtastic/203484/2 "2011-02-23T20:23:41Z")

</div>

There are other classes added to the form that may be appropriate to  
use as a hook (eg “post”), and you can also add your own classes to  
the form using the same :html option in Rails’ form\_for helper.

Justin
