I have problem with styles in my ASP.NET MVC app.
That's my head tag in _Layout.cshtml:
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@ViewBag.Title</title>
<link href="~/lib/bootstrap/css/bootstrap.css" rel="stylesheet" />
<link href="~/content/site.css" rel="stylesheet" />
</head>
site.css is my CSS file, the problem is that I have a home view (index.cshtml) which has only divs inside. It renders but none of my styles work with it.
But when I type styles locally like:
<div class="middle" style="width:500px; height:200px;">
then they are applied to the div.
Do I need to set styles in every view, or is there way to make views use _Layout styles?


body { margin-top:40px; } .navbar-brand{ height: 100px; } img{ height:70px; margin:0px 0px 0px 200px; } .navbar-default { background-color: white; border-color: white; } li{ width:100px; text-align:center; font-size:25px; margin-top:25px; } .navbar-nav{ height:100px; margin:0px 0px 0px 700px; } .banner{ width:500px; height:200px; }.banner is class which i set for div in Home View