Ask A Question

Notifications

You’re not receiving notifications from this thread.

Styles not rendering

Miguel asked in CSS

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
Reply

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.

Reply

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)

Reply

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.

Reply

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

Reply

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

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,796+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.