Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

site.css is not working for my sample web site

Newbie here.

I have created an empty MVC project in VS2010 and I'm trying to format my view for authentication. So, I've added this to site.css:

.rez 
{
color: Olive;
}

and this to my View:

@using (Html.BeginForm())
{
<div>
<label class="rez">Username</label><input type="text" name="Username"/>
</div>
<div>
Password<input type="password" name="Password"/>
</div>
<div>
<input type="submit" name="Log"/>
</div>
}

It's not working. I haven't touched routing or bundleconfig. I've configured web.config for authentication. _ViewStart and _Layout are also unchanged.

What am I doing wrong and more importantly how do I debug this issue. I'm using chrome.

like image 278
Nezreli Avatar asked Nov 30 '22 03:11

Nezreli


1 Answers

I had the same problem and I found out that the name of the file is "Site.css" and the file which is getting referenced in the BundleConfig.cs is "site.css" with lowercase s. I simply matched the file names and it worked.

edit: another thing to try is open inspect element of your browser, right click on the refresh button and hit empty cache and hard reload.

like image 66
Fakhar Ahmad Rasul Avatar answered Dec 06 '22 03:12

Fakhar Ahmad Rasul