左右两侧的高度不均匀 - CSS

时间:2015-06-13 18:52:03

标签: css height

使用以下代码,我试图让 leftside 右侧达到相同的高度,尽管我左边有很多信息,在右边一点点。我希望右侧上的文字下面有空置空间。我编码错了还是错过了什么?感谢。

#sides {
  padding-bottom: 40px;
  margin-bottom; 40px;
  background-color: white;
}

#leftside {
  width: 62%;
  display: inline-table;
  background-color: #000000;
  float: left;
  padding-right: 20px;
  padding-left: 5%;
  box-sizing: border-box;
}

#rightside {
  width: 38%;
  display: flex;
  background-color: #808080;
  float: left;
  padding-left: 20px;
  box-sizing: border-box;
  flex-direction: column;
}  

<div id="sides">
  <div id="leftside">
    <h1>TONS O' TEXT</h1>
  </div>
  <div id="rightside">
    <h1>TINY AMOUNT OF TEXT</h1>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

display: inline-table;

中删除#leftside
相关问题