Easy Way to Remove the Default.css From DotNetNuke (DNN) 7

I am currently working creating a simple DNN responsive skin using Bootstrap and found that default.css, skin.css is causing a trouble. I tried to find the solution of how to remove those css from being downloaded in the page and could not find the quick solution without using custom module and adding the tag into the skin object to remove it.

Here is an extremly quick way to fix it.

  • Open Default.aspx.cs file in a text editor
  • Go line 741 which shows the following lines of code
  • Comment out the code using /* */
ClientResourceManager.RegisterDefaultStylesheet(this, Globals.HostPath + "default.css");
ClientResourceManager.RegisterIEStylesheet(this, Globals.HostPath + "ie.css");
ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "skin.css", FileOrder.Css.SkinCss);
ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinSrc.Replace(".ascx", ".css"), FileOrder.Css.SpecificSkinCss);

Is it a best practice to change core? NO.
Does it work? Yes.
Is it quick? Yes.



Leave a Reply

Your email address will not be published. Required fields are marked *