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

Background image css not scaling down properly

I’m trying to put an image as a background of my project insde the body component, but when I reduce the screen width the image doesn’t overflow correctly. This is what I have now:

enter image description here

the css is:

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

body {
  background-image: url("https://phoenix-engineering.be/wp-content/uploads/2019/07/shutterstock_1113165392.png");
  background-size: cover;
  overflow: hidden;
  background-position: unset;
  background-repeat: no-repeat;

  text-align: center;
  font-family: "Roboto", sans-serif;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;

  min-width: 350px;
}

and when I resize the screen it results to this:

enter image description here

Is there a way to fix this issue?

>Solution :

use min-height:100vh

body {
  //prev_styles

  min-height:100vh; <-
}
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