1
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]

Hi everyone,

I would like one of my div to have an background-attachment: fixed

But the background still scroll 😤

This div is under html body div div div div div

and it CSS properties are

#TheDiv {
    min-height: 100vh;
    min-width: 100vw;
    background-image: url('/anImage.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center center;
    position: absolute;
    left: 0;
    padding: 40px;
    box-sizing: border-box }

Any Ideas, what could cause the background to scroll anyway ?

Thanks

no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 03 Sep 2024
1 points (100.0% liked)

CSS

553 readers
1 users here now

founded 2 years ago
MODERATORS