i was using grid property to build web site. but i got a problem that i can't use background property as i expect.
#wrap {
height: 100%;
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 35px 125px;
}
.line1 {
width: 1px;
height: 16px;
background: #ccc;
}
header {
background-color: #221816;
grid-column: 2/12;
}
header .topNav {
color: #fff;
}
header .topNav ul {
height: 35px;
display: flex;
flex-direction: row;
justify-content: flex-end;
}
header .topNav ul li {
align-self: center;
padding-right: 16px;
}
*,
:before,
:after {
margin: 0;
padding: 0;
border: 0;
color: #fff;
list-style: none;
}
<div id="wrap">
<header>
<nav class="topNav">
<ul>
<li><a href="#">login</a></li><span class="line1"></span>
<li><a href="#">signin</a></li>
<li><a href="#">bags</a></li>
<li>mypages<span></span></li>
<li>customer</li>
</ul>
</nav>
</header>
</div>
i expected the header's width 100%. so i put 'grid-column:1/-1;' and i got problem that contents have to be narrow. so i fix property like 'grid-column:2/12' then now i got a problem the background can't be wide. do i have solution?