Style the div with width and height value. Firstly, we change the positioning behavior of the image from static to absolute: The z-index property determines the stacking order for positioned elements (i.e. grid-template-columns is a property that dictates how many columns the grid will have and the 1fr value is for the browser to calculate the available space. Top Right. If text or another picture is already there -- tough. The position is decided automatically in order to optimize the relative position between text and image. The first approach will rely upon two elements.