Skip to main content

Styles not rendering

CSS • Asked by Miguel

Hey guys,

So I'm following a tutorial, and around the 1 hr mark, he starts adding the styles. When I tried to reproduce it, it would not render.

When I inspect an element, for example (intro), it shows me these lines from the application.css.scss : (but it doesn't render it)

body {
    font-family: "Proxima Nova";
    font-weight: 100;
}

Also, there are more attributes added as @import to the application.css.scss that should be inherited to the element (and the browser actually successfully reads it, when I click to see the file), but it doesn't render any of that stuff either.

Where I think the problem is:
These 2 lines on my application.html? Somehow? But I don't know why or how. I went to the page and copied the current version, (The exact link differs a bit from the one of the tutorial, but I also tried the old one and no luck)

  <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" rel="stylesheet"> 
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
What rookie mistake am I making??
[Here's my repo](https://github.com/mickeytgl/muse/tree/master/app/assets/stylesheets)

Cheers, Miguel

Is that the only css that doesn't work, the one referring to the font Proxima Nova? I believe that is a Typekit.com font and needs to be explicitly added, it doesn't come with Rails or Bootstrap.


Update:

The normalize and the font-awesome styles were being blocked since it was not being served in a secure protocol (https). Also, you're right Adrian, Proxima Nova is not in either (I don't know how the guy in the tutorial had no problem)


I'm glad you figured it out though. Yea his Rails tutorials are hard to follow and he doesn't really explain why he does things. I think he expects people to just follow along blindly or what. He's a really good designer though.


For some awesome Rails tutorials stick with GoRails.com or DriftingRuby and Railscasts.


Thanks for the tip! Yeah, GoRails is pretty awesome and clear :)


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.