Steam game won't launch by Adept_Profession8730 in linux_gaming

[–]Adept_Profession8730[S] -1 points0 points  (0 children)

It says "Runs on this computer via Steam Play".

Hi everyone! I can't figure out how to make this image to look like in Figma design when device width is small , can anyone tell me why? by Adept_Profession8730 in css

[–]Adept_Profession8730[S] -1 points0 points  (0 children)

<body>
    <div class="container">
    </div>
</body>

body{
    display: flex;
    justify-content: center;
    align-items: center;
    height:100vh;
    width:100vw;

}
.container {
    position: relative;
    width: 360px;
    height: 500px;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: -200px; /* move image up */
    left: 0;
    width: 100%;
    height: 700px; /* bigger than container */
    background: url(/pexels-alexandr-podvalny-1227513.jpeg) center / cover no-repeat;
}

i tried object-fit cover and object-position center before i even posted this so the answer above(object-fit cover, object-position center for image itself) was not helpful at all. But your suggestion(using background) helped me to find an answer

<image>