I'm using Visual Studio 2013 RC to create a new ASP.NET MVC project. Running the sample generated by the template works as expected. When I update bootsrap to the latest version (3) and rerun the application, my navigation bar is not rendering correctly. It's basically collapsed with just the "Application Name" link and icon in the upper left corner. If I click on it, then the menu appears, but only vertically. Something clearly wrong. Anyone else seeing this behavior?
-
Are you upgrading from Bootstrap 2 to 3, or just hooking it up for the first time?Sean Ryan– Sean Ryan2013-10-01 18:48:40 +00:00Commented Oct 1, 2013 at 18:48
-
A sample demonstrating the behavior would be helpful. Also, the act of creating the sample may point you to the problem (and solution). At least that's been my experience :)Colin Young– Colin Young2013-10-01 19:34:25 +00:00Commented Oct 1, 2013 at 19:34
-
@SeanRyan, I upgraded (using Nuget) to version 3. Version 2.3 is what is included in the MVC template for Visual Studio 2013 RC.Rick Rainey– Rick Rainey2013-10-01 19:39:46 +00:00Commented Oct 1, 2013 at 19:39
-
@ColinYoung, the sample is the default project the template creates. In other words, create new ASP.NET project, check the MVC option, and press F5 to run. Then, upgrade Bootstrap to latest version using Nuget and press F5 to run. Probably shouldn't have used the word 'sample' in my initial problem statement.Rick Rainey– Rick Rainey2013-10-01 19:46:01 +00:00Commented Oct 1, 2013 at 19:46
2 Answers
The structure of many items - including the navbar - has changed from Bootstrap 2 to 3. If you just start applying the v3 CSS to the v2 code, things are bound to go heywire.
I would start with checking out the Bootstrap 3 docs for the navbar (http://getbootstrap.com/components/#navbar) and update your HTML accordingly. Then see if you are still having an issue.
Comments
Thanks everyone for the feedback/discussion. This was indeed helpful. For the benefit of the discussion, I found this post to be spot on in getting my MVC project updated to Bootstrap 3. This is only temporary though. Once VS RTM's, this shouldn't be an issue.