when width css code example
Example 1: width css
/*Based on viewport*/
width: 100vh;
width: 100vw;
Example 2: css width percentage
<div style="background-color:navy;">
<div style="width:50%; margin-left:20%; background-color:chartreuse;">
Width: 50%, Left margin: 20%
</div>
<div style="width:30%; margin-left:60%; background-color:pink;">
Width: 30%, Left margin: 10%
</div>
</div>