views:

194

answers:

2

I've got a css file that i want to use to style my ASP.Net MVC web application.

I've included it in the solution however it doesn't seem to be taking any effect.

Have I missed something?

+2  A: 

Have you added a reference to it in the html or aspx page.

A reference must be added in the <head> element of your document:

<link rel="stylesheet" type="text/css" media="all" href="../../Content/niceforms-default.css" />

Is this what you are asking, or did I take your question too literal?

Chuck Conway
well the path to the content is the same as the default content, and when the application loads, the default styling is there still, even though the default css has been removed...........?
Goober
What do you mean by, "default styling is there still, even though the default css has been removed"?
MunkiPhD
The default page style that comes when you create a new MVC application in visual studio. i.e. The headers are still styled how they are when you create a new MVC web app, even though i have deleted the css from the file.
Goober
Have you tried ctrl+f5 to force refresh your browser. It may still have a cached version of the old css
Jesper Blad Jensen aka. Deldy
A: 

When you create an MVC application a master page is created for you in

Views\Shared\Site.Master

you will need to add the stylesheet reference in there. You will probably find that the default stylesheet is also defined in that master page.

Antony Scott