how do you link static pages in rails to your css files? [closed]


Tags: css,ruby-on-rails

Problem :

i have my css files where they need to be, now how to i link them to the html, i know i cant use traditional ways like just using a link tag, any help would be great



Solution :

put your css files in assets/stylesheets then add

<%= stylesheet_link_tag "application", :media => "all" %>

into your html tag (should be in layouts/application.html.erb)


    CSS Howto..

    How to remove the margin top from a div with display table-cell?

    How to make a simple pure css or jquery image toggle?

    How to override\edit Zurb Foundation base CSS styles?

    CSS - How to set margin-left dynamically with a fixed value

    How to add a background image inline style to link tag Rails

    How to fix
      's in footer that break in ie8 & ie9, but is perfect in ie7, FF, Safari & Chrome

    How to implement Star Rating in Intel XDK by App Framework 3.0

    How to use very large font sizes in Internet Explorer with CSS that won't affect design?

    How come the exact same version of Google Chrome shows different layout?

    How to remove a CSS class from all same level table rows When a Row is Selected?

    How can I set CSS only for specific IE browsers?

    How can I remove hover style in CSS

    How to indent a data table with CSS? [closed]

    In emacs how do I add a second type of commenting to a css derived mode?

    How do I repeat select elements in HTML

    Telerik RadEditor for MOSS - How do I suppress min-width inline CSS?

    How do I get two side by side divs displayed correctly inside a bordered, dynamic height content area?

    How do I override * asterisk for css?

    How can I change the inline style text color of an element without the ability to add a class or id?

    How to target a specific browser of a specific device via CSS?

    How to make this Header/Content/Footer layout using CSS?

    How to use Less variables in CSS

    Using html5 canvas as a background, how to position a youtube embed on top of it using css to be resolution independent?

    How can I add my own CSS styles to CKEditor

    How can I center align the list horizontally?

    How to change opacity suddenly without transition (without fade) using keyframes

    How can I generate a random color with Stylus CSS?

    how to prevent transformation of text inherited from a skewed parent

    How to give priority to a div in terms of overlapping divs on a drop down menu?

    How to get the ultimate, final calculated style value on an HTML element?