开发者

Rails 3.1 including style sheet, browser isn't using it

My team hacked together some style sheets using Adobe Muse.

I've included those in my assets folder and am able to serve them just fine.

application.css:

/*

 *= require_self
 *= require "site_global"
 *= require "frontpage"

*/

What confuses me is that in chrome debugger I see that the resources load It does not however render the stylesheet for the associated divs.

When I inspect element for the poorly displayed <div> tags it shows some of the elements from site_global.css but not from frontpage.css

Running on little sleep, demo this afternoon. Might just need a fresh set of eyes.


EDIT

Adding my application.html.erb header

  <head>
    <title><%= content_for?(:title) ? yield(:title) : "StarterTribe" %></title>
    <%= stylesheet_link_tag "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tag %>
    <%= yield(:head) %>
  &l开发者_如何学JAVAt;/head>


It shouldn't make a difference, but does it do anything different if you remove the quotes around them?

And I'm assuming you have this in your application layout:

stylesheet_link_tag 'application' 

If it's order that is important, make sure you specify the correct order in the application.css file. You can even put some items "above" *= require_self if necessary.

I may be misunderstanding your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜