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

HTML

Twitter Bootstrap classes

I've gone through the entire website and looked at the classes listed but they don't detail all the classes. Can anyone tell me where I can find these?

Cheers.

3 Answers

In the bootstrap.css file. Not quite the answer you were looking for, I'm guessing, but it is where I look. Here is why:

Typically, if you are trying to style something that is in a <table> or somewhere in your .nav class, the file has a direct pointer to it. For instance (this example is derectly shown in the Bootstrap github tut), if I have a company name in my navbar I would call it like this:

<div class="navbar"> <div class="navbar-inner"> <a class="brand" href="http://www.yourbrand.com">Brand-name</a> </div> </div>

Brand class works the way it does because it is nested in the navbar-inner class. So if you just use classes willy-nilly, sometimes they don't come out the way you would like. That is why I always look through the .css (non-minified version) file. It clues you in on how to use it correctly to get the results you want.

And, hey! If you haven't found a good resource for finding out how to use ALL the Bootstrap classes,maybe you could build it. A true claim to fame!

All the best, Patrick

Thanks for the reply.

It is strange that they wouldn't provide at least a list of names and I wasn't expecting it because bootstrap has many lines of code. Do you mean the examples provided when you reference the Bootstrap github tut? I worked through the documentation on twitter.github.com/bootstrap. I only found other properties/names/classes when I looked at the examples.

I've found a few classes but not all of them, notable absences are actually brand-name and masthead (I found .masthead in doc.css, is this just the doc custom css?). I'm pretty sure I am using the latest version.

I've noticed that in some cases bootstrapped websites had a 'wrap' id and then a container class that contains elements such as a title but some don't.

It does sound like a good project! Perhaps!

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hey James,

You might want to try our Ruby on Rails project. Jim and Jason use Bootstrap, and it's helpful because it shows how to use it in a real project. Check it out: http://teamtreehouse.com/library/programming-2/build-a-simple-ruby-on-rails-application

You might also want to check out this awesome blog post from Zac, about how to use Bootstrap with WordPress: http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial