user470763
user470763

Reputation:

Rails: Use a stylesheet only on specific pages

I have a stylesheet to set the font weight on <p> and <h2> tags on a specific page on my site. I would like the rest of the site to use the regular styles. How can I specify a CSS file to only link to one specific page?

Upvotes: 1

Views: 2062

Answers (2)

Heartcroft
Heartcroft

Reputation: 1712

I suggest you use a class instead. :)

Upvotes: 1

Sachin Singh
Sachin Singh

Reputation: 7225

use

stylesheet_link_tag "style"

for that particular view file and put at the top that view file.

and don't require it the application.css

Upvotes: 1

Related Questions