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 Build a Simple Ruby on Rails Application Customizing Forms Navigation Links

Sean Perryman
Sean Perryman
13,810 Points

Current bootstrap and floating things to the right

So I am using bootstrap v3.1.1, and I have been unable to get any of the links to float to the right side of the bar.

I've tried adding the class navbar-right (what looks to have replaced pull-right) to both the ul tag and the individual list item tags, both independently and together, and everything says scrunched to the left. Just as a control I tried adding the class pull-right as well, both by itself and with the navbar-right class, and nothing seems to be working.

I thought I would be clever and just inline style that ul tag to float right, but as you can imagine it didn't work :)

Has anyone had this problem and found a way around it? As with some of the other issues I've had with Ruby thus far, I feel like I am missing a simple step that is likely right in front of my face.

2 Answers

Sean, have you taken a look at Bootstrap's documentation regarding the navbar? You can that that here. I would start by comparing your navbar structure (and assigned classes) to what's in the documentation. Often times it's an omitted class name or slightly different structure that causes these issues.

Sean Perryman
Sean Perryman
13,810 Points

Bob, you were right. I had originally just copied most of the navbar code over in frustration (using bootstrap 3 when the videos use bootstrap 2). What I found was that the container that housed the navbar seems to need to be class "container" and I had it as "container-fluid". When I changed it over, everything started working properly. Thanks for the feedback!