با سلام
یک لوگو به اول صفحه افزوده ام ولی دو مشکل پیش آمده:
دقیقا از ابتدای سمت چپ صفحه شروع نمی شود
چون با افزودن عکس عرض بیشتری از صفحه اشغال شده است لذا در برخی صفحات مثل صفحه مشخصات تماس دیگر سطرهای اول و دوم دیده نمی شوند.
چه تغییری باید اعمال کنم؟
11.png
کد HTML:
_Layout.cshtml
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - </title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<script src="~/Scripts/jquery-3.4.1.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src=”-/Scripts/jquery.unobtrusive-ajax.min.js”></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" >
<div class="container">
<!--div class="float-left">
<p class="site-title"><a runat="server" href="http://www.your_url.com/"><img src="../Images/img1.png" alt="" /></a></p>
</div -->
<div class="navbar-header">
<href ="@Url.Action("Index", "Home")">
<img src="../Images/img1.png" alt="Site Logo" style="height:auto; width:100vw" />
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("MyProject", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse" >
<ul class="nav navbar-nav" >
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About us", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
<li>@Html.ActionLink("Student", "Index", "Student")</li>
<li>@Html.ActionLink("Personal", "Index", "Personal")</li>
</ul>
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - <span style="color:aqua"><a href="http://www.mycompani.com" target="_blank">my company information</a></span></p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>
کد HTML:
Index.cshtml
@{ ViewBag.Title = "home"; }
<div class="jumbotron">
<h1></h1>
</div>
<div class="row">
<div class="col-md-4">
<h2>asp.net</h2>
<p>
Contoso University is a sample application that demonstrates how to use Entity Framework 6 in
an ASP.NET MVC 5 web application.
</p>
</div>
<div class="col-md-4">
<h2>item 2</h2>
<p>
You can build the application by following the steps in the tutorial series on the ASP.NET
site.
</p>
<p>
<a class="btn btn-default" href="http://www.asp.net/mvc/tutorials/getting-started-with-efusingmvc/">
click item2 »
</a>
</p>
</div>
<div class="col-md-4">
<h2>item 1</h2>
<p>item 1 information</p>
<p>
<a class="btn btn-default" href="http://code.msdn.microsoft.com/ASPNET-MVCApplicationb01a9fe8">
click »
</a>
</p>
<p>new row</p>
<p><a class="btn btn-success" href="https://go.microsoft.com/fwlink/?LinkId=301867">click »</a></p>
</div>
<div class="col-md-4">
<h2>item 3</h2>
<p>aaaaaaaaaaaa</p>
<p><a class="btn btn-success" href="https://go.microsoft.com/fwlink/?LinkId=301867">click »</a></p>
</div>
<div class="col-md-4">
<div class="navbar-collapse collapse">
<!-- -->
<ul class="btn btn-default">
<li>@Html.ActionLink("myEtc", "Etc", "Home")</li>
</ul>
</div>
</div>
</div>
باتشکر