I am developing a website and have noticed that it does not preform correctly on all the browsers.
I Would like to create a different CSS style sheet for each browser, mainly IE.
My problem comes in on how to call the different style sheets with the different browsers.
I also cant find where the main site.css is called in my MVC website, if someone could show me where the site.css is called in a MVC website that would be great.
So where and how do i call different style sheets for different browsers in a MVC website?
Using a browser specific stylesheet is no different in ASP .NET MVC. You put the
ifstatement and point to the stylesheet. See more here. You can put your stylesheet statements in the_Layout.cshtmlfile in theViews\SharedfolderIn ASP .NET MVC, the stylesheet is in the
Contentfolder.ASP .NET MVC 4 uses Minification and Bundling. Look inside the
App_Startfolder, you will see a BundleConfig.cs file, and inside, you will see thebundlesthat contain the css and javascript. In the_layout.cshtlfile, you will see code that references thesebundles,which is something like@Styles.Render("~/Content/css").“So where and how do i call different style sheets for different browsers in a MVC website?”
In the Layout file which has your
<head>tags. like this: