首页htmltwo_columnCSS Layout - 如何匹配两列布局中两列的高度

CSS Layout - 如何匹配两列布局中两列的高度

我们想知道如何匹配两列布局中两列的高度。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.wrapper {
  height: 100%;
  width: 100%;
  display: table;
  float: left;
}

.content {
  border: 1px solid red;
  margin: 5em 0 0;
  padding: 1em;
  height: 100%;
  background: red; /* for test */
  display: table-cell;
}

.sidebar {
  border: 1px solid blue;
  margin: 5em -0.1em 0;
  padding: 1em;
  height: 100%;
  background: #EEE; /* for test */
  display: table-cell;
}
</style>
</head>
<body>
  <div id="#wrapper">
    <div class="content">asdf</div>
    <div class="sidebar">
      asdf<br>asdf<br>asdf
    </div>
  </div>
</body>
</html>