I’m trying to make images stick to the top when scrolled past while not affecting each others position, also I’d prefer to keep it simple with no javascript
current code:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="./styles.css" />
</head>
<body>
<img src="./img1.svg" />
<img src="./img2.svg" />
<img src="./img3.svg" />
<img src="./img4.svg" />
</body>
</html>
<style>
body {
margin: 0;
}
img {
width: 100%;
position: sticky;
left: 0;
top: 0;
}
</style>
also here’s a link to gh pages to visualize the problem
https://unixpariah.github.io/automatic-sniffle/