Click here to Skip to main content
15,908,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I would really like some help with an issue. I am currently designing a website using MVC 3. My approach is to use a Site.css file for the common design and have the views use the Site.css for the different views. Yet strangely, any changes that I make to the Site.css file do NOT seem to change any of the views.

For example, I may start with a green header h1 in my Site.css file. In my views, the <h1> content </h1> shows up just fine as green. Yet when I decide to change it to a different color (white) in the Site.css file, all of the h1 headers in my views remain green and not white. To me this seems like any changes I make aren't applied properly and the last successful website is shown when debugging. I have tried rebuilding and restarting visual studio, and nothing fixes the problem. :(

Anyone have any clue why I am having this problem? Any help would be tremendously appreciated.

Thanks,
Nik
Posted

1 solution

i would check the file you are modifying (site.css) is infacted the file being linked into the _Layout.cshtml (or whatever other root template youre using)

"<link href="@Url.Content("~/Content/SiteTypoHere.css")" rel="stylesheet" type="text/css" />"


also load the page in FireFox use firebug and select the heading it will give u a line number ref to the CSS code and filename it is ACTUALLY using to render


hope one of these helps you.
 
Share this answer
 
v3
Comments
nik121 4-Oct-11 16:59pm    
Well the site.css was linked properly in _Layout.cshtml, so that's out of the picture.

I used firebug with Firefox, and it sort of answered my question. All of the designs show up properly on Firefox, so I know that site.css works. Unfortunately, Internet Explorer does NOT in fact show these changes.

So now it's off to the next question... What is it that causes Mozilla to display the design properly, and not Internet Explorer?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900