【问题标题】:How can I center two columns in a row on this theme?如何在此主题上将两列连续居中?
【发布时间】:2020-09-01 14:39:39
【问题描述】:

我有这个主题:https://www.similaricons.com/demos/milano/about.html,我想减少“有创意”下面显示的人。挡住2。现在,当我移走两个人时,剩下的粘在左边。我不想要那个。相反,当我拥有lg 分辨率时,我希望它们都位于中心。你能帮忙吗?

【问题讨论】:

标签: html css twitter-bootstrap web


【解决方案1】:

您可以做的是将 div 放在表格中的单行中。在下面查看我的示例:

#tbl_container {
  background: red;
  width: 100%;
}

#tbl_container > table {
  margin-left: auto;
    margin-right: auto;
}

.pic_block {
  background: black;
  width: 80px;
    height: 100px;
    float: left;
    margin: 5px;
}
<!DOCTYPE html>
<html>
  <body>

    <div id="tbl_container">
      <table>
          <tr>
              <td>
                  <div class="pic_block"></div>
                  <div class="pic_block"></div>
                  <div class="pic_block"></div>
                  <div class="pic_block"></div>
              </td>
          </tr>
      </table>
    </div>

  </body>
</html>

【讨论】:

    猜你喜欢
    • 2021-04-11
    • 2020-03-05
    • 1970-01-01
    • 2023-02-02
    • 1970-01-01
    • 1970-01-01
    • 2022-10-23
    • 2021-12-01
    • 2019-09-29
    相关资源
    最近更新 更多