사이드 바를 꼬리말 바로 앞에 붙이기를 원합니다. The line shows where the sidebar should end웹 사이트 사이드 바 CSS
첫 번째 것은 사이드 바의 CSS 코드입니다. 두 번째 것은 전체 페이지의 HTML 코드입니다. 사전에
#sidebar {
float: right;
background: #d1bdbd;
padding: 10px;
top: 65px;
bottom: 0;
right: 50px;
position: absolute;
}
<div class="row" id="sidebar" style="text-align: center">
<h3>Current Time:</h3>
<embed src=http://flash-clocks.com/free-flash-clocks-blog-topics/free-flash-clock-161.swf width=200 height=100 wmode=transparent type=application/x-shockwave-flash>
<h3>Most recent posts:</h3>
@foreach (var post in ViewBag.SidebarPosts) {
<div><a href="Posts/Details/@post.Id" class="hyperlink"> @post.Title</a>
</div>
}
</div>
@foreach (var post in Model) {
<section class="row">
<article class="post col-md-8">
<h2 class="title"><a href="/Posts/Details/@post.Id" class="hyperlink">@post.Title</a></h2>
<div class="about">
Posted on <i>@post.Date</i>
@if (post.Author!=null) { @: by <i>@post.Author.FullName</i>
}
</div>
<div class="body">@Html.Raw(Utils.CutText(post.Body)) @Html.ActionLink("Read more", $"Details/{post.Id}", "Posts")</div>
</article>
</section>
}
감사합니다.
음이 아무것도 변경되지 않습니다 –