In my asp.net mvc web application I have a razor layout page with a partial view @Html.Partial("_HorizontalNavbar")
in it.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="@Url.Content("~/Content/kendo/2020.2.513/kendo.bootstrap-v4.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2020.2.513/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2020.2.513/angular.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2020.2.513/jszip.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2020.2.513/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
</head>
<body class="k-content">
@Html.Partial("_HorizontalNavbar")
<main>
<div class="container">
@RenderSection("featured", required: false)
@RenderBody()
</div>
</main>
</body>
</html>
For the partial view I do not need all the css that is referenced in the layout page; actually it interferes with the css that is inside the partial view. Is there a way to setup a partial view so that it is not affected by the css of the layout page? Any help will be gratefully appreciated.