 width: 300px;
  height: 100px;
}

box1 {
    height: 50px;
    width: 50px;
    background-color: blue;
}

box2 {
    height: 50px;
    background-color: red;
}

box3 {
    width: 100px;
    height: 50px;
    background-color: purple;
    z-index: 1;
}

box4 {
    height: 50px;
    background-color: green;
}
</style>

<grid>
    <box1>1</box1>
    <box2>2</box2>
    <box3>3</box3>
    <box4>4</box4>
</grid>

</body>
</html>
