Background img doesn`t display in all Android broswers - android

Using all browsers on Computer (chrome, safari, opera, edge) the background image in footer is displayed fine. But using browsers in ANDROID the background image does NOT displayed. In the other hand, using an iPhone (safari, chrome) my image in footer is displayed!!! The only bug/problem there is on Android`s browsers.
<footer class="footer" style="background-image: url('img/creative/backgrounds/lll.jpg')">
//Css Code
footer.footer {
color: white;
background: no-repeat center center scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
padding: 255px 0 20px;
}

Related

Website not scrolling on an android mobile

I'm working on a website that scrolls as it should in Desktop and iPhone, but it doesn't scrolls in Android mobile (testing on Huawei P10).
In my css I have lines like:
body {
font-family: 'Montserrat', sans-serif;
min-height:100%; height:100%;
-webkit-font-smoothing: subpixel-antialiased;
background: url('../img/bg-main.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
If you wanted to see, this is the website: CLICK

Content scroll over background image - iOS and android

I am using a full page image background on a bootstrap template which allows text to scroll over the background when viewed on a desktop.
.background_html {
background: url(http://*******.com/web/4.jpg) no-repeat top center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
I have used a media query to load a smaller size image for mobile devices:
#media (max-width: 600px) {
.custom_bg_5 {
background: url(http://******.com/web/4_sm.jpg) no-repeat top center fixed;
-webkit-background-size: auto auto;
-moz-background-size: auto auto;
-o-background-size: auto auto;
background-size: auto auto;
}
}
This resizes the image correctly but the image doesn't remain fixed and just scrolls with the text. This leaves a blank space beneath the image as I scroll down (ie when the bottom of the image has been reached).
I want the text to just scroll over a fixed background image on mobile devices.
Is there a fix for this yet?

Background image not responsive when viewed on mobile or iPad

I am having an issue with the background image for my site.
When re-sizing in the browser (chrome) it responds how it should, however when I upload it to my server and open the site from my mobile device, it does not re-size. The image just stays the original size and is zoomed into one area of the image.
Can anyone help please?
Here is the code:
html{
background: url(../img/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-position: 50% 50%;
background-color: #FFF;
}
for small devices use following property
html{background-size: 100% auto;}

CSS Background COVER property doesnt works on Phone

I'm experiencing a strange issue: When I open a website on my Android 4.1 phone (default browser), the background image doesnt cover the background as it should.
Here is the screen from phone:
Pieces of code, according to background attributes:
...
<meta name="viewport" content="width=device-width">
...
background: #fff url('img/main_bg.png')no-repeat center center;
-webkit-background-size: cover !important;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/main_bg.png', sizingMethod='scale')";
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/main_bg.png', sizingMethod='scale')";
Although, things that I've tried is setting the min-hegith and width property at 100 % - didnt make the things work.
Hope that you have any ideas, how to figure out this issue.
Try the following code snippet. It seems to be a problem of the native Android browser to parse multiple CSS tags for the background property. So define each property seperate might help:
...
<meta name="viewport" content="width=device-width">
...
background-image:url('img/main_bg.png');
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
-webkit-background-size: cover !important;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/main_bg.png', sizingMethod='scale')";
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/main_bg.png', sizingMethod='scale')";

Why does this CSS not work for Chrome on Android but works everywhere else?

This really puzzles me. I want to have pic.jpg be static in the background (not move when scrolling) and that it won't stretch.
It works on every browser (i.e. Chrome, Safari, Firefox) except Chrome on Android (it even works on Android original browser)
body{
background-color: transparent !important;
background-image: url(<%= asset_path "pic.jpg" %>);
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Chrome for Android renders it as pic.jpg being halfway up in the screen, not on the entire page and doesn't stay static on scroll..
I can't reproduce it on jsfiddle, I also try to debug it with my Android phone and nothing seems to help.
Isn't this the way to create the background image?
I do not wanna be cruel but this issue has been reported approximately 4 years ago
http://code.google.com/p/android/issues/detail?id=3301
most recent response can help I guess:
In my experiments with Android, I noticed that all the other DIVs within the body behaved correctly, including centering, so I moved image to another DIV and it worked.
Funny one.
best
I have the similar problem.. and I fix it with this
html{
height:100%;
min-height:100%;
}
body{
min-height:100%;
}
I have found a workaround that makes the background display correctly on Chrome for Android: define the background in the html tag, not the body. Here is the new css:
html{
background-color: transparent !important;
background-image: url(<%= asset_path "pic.jpg" %>);
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
And yes, this is valid markup. In my experience, the background still works correctly in every other browser too.

Categories

Resources