Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default CSS File which is apply to the _Layout.cshtml using code in MVC 4

For eg:-In MVC Website the default css is Applyed "Site.css" and I want to Apply "MyStlyle.css" inplace of "Site.css"... How Can I change this File?

like image 809
Hiren Kundariya Avatar asked Dec 05 '25 08:12

Hiren Kundariya


1 Answers

Root > App_Start > BundleConfig.cs

Change this line:

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

to

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/MyStlyle.css"));

And place your custom css in Root/Content/ folder.

like image 197
AliRıza Adıyahşi Avatar answered Dec 08 '25 23:12

AliRıza Adıyahşi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!