0

I tried to do this:

@media only screen and (max-width: 500px) {
    body {
        background: url("http://popidesigns.ro/images/bgtel.png") no-repeat center center fixed;
    }
}

With the new picture @ 1080x1920(normal it was 1920x1080) But no change. How can I make the BG Pic visible on the whole phone screen? (the bg image is that thing above the logo)
phone ss

laptop ss

Muhammad Omer Aslam
  • 22,976
  • 9
  • 42
  • 68
Popi
  • 1
  • 1

3 Answers3

0

add background-size: cover to fill the container/body

...and make sure the body is at least 100% high by adding

html, body {
  height: 100%;
}
Johannes
  • 64,305
  • 18
  • 73
  • 130
  • body { background: url("http://popidesigns.ro/images/bgbgb.png") no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; height: 100%; } did that but still not working – Popi Nov 28 '17 at 21:25
0

See if this helps you: https://codepen.io/panchroma/pen/KyrvOP

CSS

html, body {
  height: 100%;
}

@media screen and (max-width: 500px) {

  body{
  background:url('http://popidesigns.ro/images/bgbgb.png') no-repeat;
  background-size:cover;
  }
}  

I also added a viewport meta tag in the head of the page

<meta name="viewport" content="width=device-width, initial-scale=1.0">
David Taiaroa
  • 25,157
  • 7
  • 62
  • 50
0
body{
    background: URL("http://popidesigns.ro/images/bgtel.png") no-repeat center;
    background-size: cover;
    width: 100%;
}

This will make sure that the image doesn't repeat and is centered. The background-size:cover; will ensure that the image will cover the entire screen. width at 100% helps with that.

Robin J
  • 25
  • 8