Reputation: 239
I have an ASP.NET MVC application that works fine when I run it on Visual Studio. But when I publish it, all the styles dont seem to work. Are there any general guidelines on why styles dont work for an MVC application when published because right now I have no clue on what is happenning??
Any ideas and suggestions are appreciated!
Upvotes: 3
Views: 4344
Reputation: 16032
There are many reasons why your css styles might not show up.
Url.Content("~/...")
for getting the right url). This is an issue when you use not the same path on your IIS and your IDE.But the first check in any cas is to run fiddler and see
Upvotes: 4
Reputation: 102378
Get Firebug, inspect the element that should have the style applied and see what CSS is actually present.
Take a look at the CSS Panel and see the CSS files that are being linked (click the down arrow in the master.css as shown in the image below).
Upvotes: 1
Reputation: 2685
It is possible that you have defined the styles in a new file and have not included the new css file in your project (in Visual Studio .net).
VS.Net does not publish those files which are not part of the project.
Upvotes: 2