If width:100%
works in any cases, just use that, otherwise you can use vw
in this case which is relative to 1% of the width of the viewport.
That means if you want to cover off the width, just use 100vw
.
Look at the image I draw for you here:
Try the snippet I created for you as below:
.full-width {_x000D_
width: 100vw;_x000D_
height: 100px;_x000D_
margin-bottom: 40px;_x000D_
background-color: red;_x000D_
}_x000D_
_x000D_
.one-vw-width {_x000D_
width: 1vw;_x000D_
height: 100px;_x000D_
background-color: red;_x000D_
}
_x000D_
<div class="full-width"></div>_x000D_
<div class="one-vw-width"></div>
_x000D_