小编Mat*_*aux的帖子

Grid area won't move into grid rows with percentage values

I can get the div to move to the correct column but not the correct row.

This will display the blue rectangle in the correct column, but for whatever reason it isn't moving in to the row I need it to. Thank you all for your help.

body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 10% 80% 10%;
}

#navigation {
  grid-column: 2/2;
  grid-row: 2/2;
  height: 400px;
  width: 100%;
  background-color: blue;
}
Run Code Online (Sandbox Code Playgroud)
<div id="navigation"></div>
<div id="menunBar"></div>
<div id="mainContent"></div>
Run Code Online (Sandbox Code Playgroud)

html css css-grid

3
推荐指数
1
解决办法
6513
查看次数

标签 统计

css ×1

css-grid ×1

html ×1