[英]Suggestion how to make a grid in banner
On this page:(I just set a red and green border to make it more clear) 在此页面上:(我只是设置了红色和绿色边框以使其更加清晰)
I have a picture of a book, which need to be in the left side where the black border is: 我有一本书的图片,需要放在黑色边框的左侧:
I have tried to build up the banner with the code below. 我试图用下面的代码来构建横幅。 But I cannot figure out how I can set a div tag that would fit the left side where the black border is.
但是我不知道如何设置适合黑色边框左侧的div标签。
Does anybody have an advice on how I could do that?. 有人对我该怎么做有意见吗? The code there is until now is this:
到目前为止的代码是:
<div class="top-area" style="border: 4px solid red;">
<div class="container" style="border: 4px solid green;">
@if (!string.IsNullOrEmpty(headerText))
{
if (pageAlias == "Blog")
{
<h1 class="header-xl center">
@Html.Raw(headerText)
</h1>
}
else
{
<p class="header-xl center">
@Html.Raw(headerText)
</p>
}
}
@if (CurrentPage.HasValue("imageTeaserText"))
{
<p class="sub-header center">
@Html.Raw(CurrentPage.imageTeaserText)
</p>
}
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 main-content" id="main-content">
<div class="row">
<div class="col-lg-12">
@CurrentPage.GetGridHtml("inovoGrid")
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Here's an example on plunkr using the bootstrap columns to keep elements aligned on either side of your title. 这是关于使用引导栏使元素在标题的两侧对齐的plunkr的示例 。 Bootstrap aligns its grid based on 12 columns.
Bootstrap会根据12列对齐其网格。 I've only added support for small density screens via
col-sm-x
, you should experiment with the other densities. 我仅通过
col-sm-x
添加了对小密度屏幕的支持,您应该尝试其他密度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.