Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Cameron Taylor
Cameron Taylor
2,098 Points

Using Bootstrap

Hi there,

After downloading bootstrap and putting the .js and .css files in my rails directory, for some reason the css file isn't inputting all the formatting on the navbar (as is done in the Frontend Development badge in Building a Simple App). When I inspect element from Chrome, only some of the bootstrap.css formatting is being applied. Of note, some of the media="all" elements, such as webkit box sizing, are crossed off and I have no idea why.

Any help would be much appreciated.

Thanks.

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

Are you using Boostrap 3? The video files use Bootstrap 2, and some of the names for things have changed in the recent release of Bootstrap 3. I recommend checking the documentation to see what has changed. You could be calling classes that no longer exist in Bootstrap 3.

The media elements are crossed out because they're being negated by styling further up the hierarchy.

Rails uses the asset pipeline, so any JS or CSS you want to include needs to be in the appropriate directories. If you need a better hint after reading through the link above, let me know.

Cameron Taylor
Cameron Taylor
2,098 Points

Thanks Scott. I read through the asset pipeline documentation but I'm still confused. So is the bootsrap.css styling being negated by application.css, which is in the same folder (app/assets/stylesheets)? Do I need to create a relative path within application.css to bootstrap.css? If so, how?

Sorry, I'm a bit of a noob.