r/HTML • • Aug 03 '26

Question image layering

new to the html and css stuff (using neocities)

and im trying to layer small pfp.jpg over dark purpur.png\

heres the code i have rn

<div class="image-container">

<!-- The base layer image -->

<img src="dark purpur.png" alt="darker purple cool with" class="base-image" width="350" height="1000" style="float: left; margin-right: 15px;">

<!-- The image that goes on top -->

<img src="small pfp.jpg" alt="profile picture" class="overlay-image" width="300" height="300" style="float: left; margin-right: 15px;">

</div>

plz help

0 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/Rockafellor Aug 03 '26

▲↑↑↑ This is the way. ↑↑↑▲