在另一列结束后水平扩展Bulma列

问题描述 投票:0回答:1

我正在尝试在Bulma框架中进行第一次设计;我有三个网站内容部分的列设计。

但是,当第二列结束时,我希望中间列长到完整高度。

目前设计看起来像thisenter image description here

我希望实现的是在Evens Calendar列结束后文章增长到全宽的列。

目前我的代码如下所示:

  <main id="site-content">    
<div class="columns is-multiline">
  <div id="site-content-sidebar-left" class="column is-one-fifth">
    <h2 class="title is-2">News</h2>
  </div>
  <div id="site-content-primary" class="column">
    <article class="column">
      <h2 class="title">2nd article</h2>
      <p>jskjdskjdksjkdsjsd</p>
      <span>
        March 1, 2019 | 
        <a href="http://localhost/author/mark/" title="Posts by Mark Stopka" rel="author">Mark Stopka</a> | 
          <a href="http://localhost/category/uncategorized/" rel="category tag">Uncategorized</a>            </span>
        <hr />
      </article>
      <article class="column">
        <h2 class="title">Hello world!</h2>
        <p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>
        <span>
          February 28, 2019 | 
          <a href="http://localhost/author/mark/" title="Posts by Mark Stopka" rel="author">Mark Stopka</a> | 
          <a href="http://localhost/category/uncategorized/" rel="category tag">Uncategorized</a>            </span>
        <hr />
      </article>
    </div>
    <div id="site-content-sidebar-right" class="column is-one-fifth">
      <h2 class="title is-3">Events Calendar</h2>
    </div>
  </div>

我的风格如下:

#site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

#site-content {
  flex: 1;
  margin: 1rem;
}

#site-content-sidebar-left {
  border: 1px solid red;
  border-radius: 25px;
}

#site-content-primary {

}

#site-content-sidebar-right {
  border: 1px solid red;
  height: fit-content;
  border-radius: 25px;
}

id="site-content-primary"不再被内容占用时,如何使#site-content-sidebar-right扩展到<div id="site-content-sidebar-right" class="column is-one-fifth"> <h2 class="title is-3">Events Calendar</h2> </div> 以下?

css bulma
1个回答
0
投票

好的,问题解决了,我感动了

<div id="site-content-primary" class="column">

进入float: right;并将其设置为qazxswpoi。

© www.soinside.com 2019 - 2024. All rights reserved.