Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make background image appear bigger on mobile browser

I’m currently trying to make a background image for desktop and mobile. But I don’t know how to interpret the different sizes into the webpage. I have a media query set up, but every time I try to input the width: 150% and overflow: hidden it still doesn’t seem to fix the problem.

This what it looks like for desktop and this is what mobile looks like. You can see my problem with mobile is that I’m trying to expand the background image/src to make the arcade machine appear bigger/fuller and more centered for a better website design If anyone can help me figure this out, I will try anything.

Heres the HTML and the CSS

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

add these lines to your images in the CSS

    background-position: center center;
    background-attachment: fixed;
    object-fit: cover;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading