2

I have a similar problem to this: Software keyboard resizes background image on Android

The solutions given there are for Android development. They don't help. I'm seeking a solution for websites in general using CSS/JavaScript.

My current CSS:

#video_mob {
position: fixed;
background: url(../terminal/background.gif) no-repeat center center fixed;
background-size: cover;
-webkit-background-size: cover;
top: 0px;
left: 0px;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -1000;
overflow: hidden;
}

One option sort of fixes it, but the background actually shifts itself upwards.

-webkit-background-size: 280% auto;

Any further ideas? CSS or JS solutions welcome.

Community
  • 1
  • 1
osteopathx
  • 79
  • 2
  • 7
  • yeah... this question might be helpful for you.http://stackoverflow.com/questions/11099930/100-width-background-image-with-an-auto-height – smali Apr 27 '15 at 05:48
  • Here's an idea, try `background-attachment: fixed` http://www.w3schools.com/cssref/pr_background-attachment.asp – sweeds Apr 27 '15 at 05:51
  • 1
    `background-attachment: fixed` didn't work, but thanks sweeds for investigating :) I found a solution below. – osteopathx Apr 27 '15 at 06:03

1 Answers1

2

Ah, solution found! Silly me.

FYI this is the requirement:

background: url(../terminal/background.gif) no-repeat center top fixed;
background-size: 280% auto;

Had to set the position to center top.

osteopathx
  • 79
  • 2
  • 7