# Css tag to ruby code

**URL:** <https://www.ruby-forum.com/t/css-tag-to-ruby-code/152376>\
**Category:** Rails\
**Created:** [November 3, 2008, 11:18am UTC](https://www.ruby-forum.com/t/css-tag-to-ruby-code/152376 "2008-11-03T11:18:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ishara\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/e68b1a/32.png) [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Post date:** [November 3, 2008, 11:18am UTC](https://www.ruby-forum.com/t/css-tag-to-ruby-code/152376/1 "2008-11-03T11:18:15Z")

</div>

can anyone tell me how can i apply css tag to ruby codes

---

<div class="post-metadata">

**Author:** ![Ishara\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/e68b1a/32.png) [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Post date:** [November 3, 2008, 11:22am UTC](https://www.ruby-forum.com/t/css-tag-to-ruby-code/152376/2 "2008-11-03T11:22:21Z")

</div>

On 3 Nov 2008, at 10:17, Ishara G. wrote:

> can anyone tell me how can i apply css tag to ruby codes

I’m not sure that means anything at all. If you want to style the  
pages you produce with rails using css then

- either the tags themselves are just in the .erb files: do as you  
usually do
- if they are generated by a rails helper (eg form\_for, link\_to),  
these all take a hash of html options which you can use to set their  
class and so on (or inline styles if you are so inclined)

Fred
