# Add css to text\_field\_tag

**URL:** <https://www.ruby-forum.com/t/add-css-to-text-field-tag/146025>\
**Category:** Rails\
**Created:** [August 16, 2008, 8:03am UTC](https://www.ruby-forum.com/t/add-css-to-text-field-tag/146025 "2008-08-16T08:03:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heldopslippers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Post date:** [August 16, 2008, 8:03am UTC](https://www.ruby-forum.com/t/add-css-to-text-field-tag/146025/1 "2008-08-16T08:03:07Z")

</div>

hi all,

I have the following problem.  
I have a text\_field\_tag and want to add some css style to it.  
so i need something like a :class =\> ‘field\_style’ or something

i have been searching for quite some time now but can’t find the answer

thanxs, jeljer

---

<div class="post-metadata">

**Author:** ![heldopslippers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Post date:** [August 16, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/add-css-to-text-field-tag/146025/2 "2008-08-16T13:51:33Z")

</div>

On 16 Aug 2008, at 07:03, jeljer te Wies wrote:

> hi all,
> 
> I have the following problem.  
> I have a text\_field\_tag and want to add some css style to it.  
> so i need something like a :class =\> ‘field\_style’ or something

There’s an example in the api docs for tex\_field\_tag: text\_field\_tag  
name, value, :class =\> ‘something’

Fred
