I have a haml page which renders without the css that I am trying to reference.
I have this in my application.html.haml
-controller_action = "#{controller_name}##{action_name}"
!!! 5
%html
%head
%a {:href => 'http://twitter-bootstrap/twitter-bootstrap-v2/docs/assets/css/bootstrap.css'}
%body
and I have a page with just this:
.navbar .navbar-fixed-top Hello, World!
which is using the Twitter bootstrap css from here: http://twitter.github.com/bootstrap/
I was expecting to have some of the elements of the css framework to show up on my page, but they are not showing up.
I think it might be a problem with how I try to use the application file to reference the css framework.
First, the URL you’re using is wrong, then the way you’re importing the CSS is also wrong and lastly you should not serve the CSS file from another website, you should serve it from yours.
Copy this CSS to your project, inside public/stylesheets if you are using Rails 2.X or app/assets/stylesheets if you are using Rails 3.X and then use the correct helper:
Then you will have the CSS working correctly.