2nd Web Deploy lost CSS Styling

Discussion in 'General troubleshooting' started by John, Feb 15, 2015.

  1. Hi,

    I initially used Visual Studios 2013 to publish my site using Web deploy. The first time worked great... my site looked exactly as it does on my development machine. I then made a minor update to a page and published the site again and I lost my CSS Stylings even though my bootstrap CSS files were uploaded and in the correct place.

    I tried googling the issue and not having any luck! Attached is what it looks like locally and what it looked like on the live Winhost server before the 2nd publishing.

    What it looks like now: http://www.starmaintenancelex.com/

    Wbhat did I do wrong? And how can I fix it?
     

    Attached Files:

    Last edited by a moderator: Oct 14, 2015
  2. I added the reference to the bootstrap CSS file to my index file and now the index page has styling. The problem must be with the bundling:

    in layout page:
    @Styles.Render("~/Content/css")

    in App_Start --> BundleConfig.cs:

    bundles.Add(new StyleBundle("~/Content/css").Include(
    "~/Content/bootstrap.css",
    "~/Content/site.css"));
     
    ComputerMan and Michael like this.
  3. I figured out the problem... I had a folder: Content\CSS that had the font-awesome css files in it. I read that if IIS sees a Content\CSS file structure then it uses that for finding the stylesheets instead of the bundle. I changed the folder to csss and now all my pages are displaying correctly! Yea!
     
    ComputerMan and Elshadriel like this.
  4. Elshadriel

    Elshadriel Winhost Staff

    Thanks for posting the follow-up. I'm sure it will help someone.
     
  5. Thanks for posting. This certainly helped me...
     
    ComputerMan and Elshadriel like this.

Share This Page