-
Notifications
You must be signed in to change notification settings - Fork 0
33 CSS Style
To style your application using CSS style sheets, you need to add your style to the /Content/Site.css file. The styles included in this file override all other styles including bootstrap styles.
You may use the Inspect tool to check if the style is applied or not.
If your modified style is not taken into consideration, check source of the page (using inspect), the link to site.css should be present in the header of the file.
If still there is an issue with the style, you may change the bootstrap.css and bootstrap.min.css directly to reflect your style. Be aware that when you update bootstrap through Nuget, this will erase all your changes. In this case, you need to make a backup of your bootstrap.css file
Example: Change the navbar background color
.navbar-inverse {
background-color: #ccc !important;
}If you change the bootstrap.css file you need also to change bootstrap.min.css since the later is used when in non debugging mode.
To avoid minification and bundeling at all, include the following code into your Global.asax file:
// Disable bundling an minification of scripts and css styles
System.Web.Optimization.BundleTable.EnableOptimizations = false;After adding the above code, you include your css changes only in bootstrap.css