CSS position causes tablet browser to black out - android

On especially Apple Ipad air, or ipad mini (retina) these site goes completely dark gray for approx. 30 seconds, before the site appears.
On PC/Mac or most smartphones, along with android based tablets, the page layout renders nicely.
I've narrowed it down - I hope - to CSS "position" of the wrappers.
If I remove the position: absolute; on #hoejrewrap and #hovedwrap, and position: relative on #indholdsramme, the problem is solved, but introduces overlapping divs on tablet or zooming in/out in all other browsers.
Any clues?
Trin

Related

Remove arrow from time input in Android Chrome

I'm working on a webapp also to be used on small smartphones. One of the fields in a form is a time input field. I need this to be nice and small and a width of 55px does the trick on most OS and browsers.
<input type="time" value="12:34" style="width:55px">
However, Android Chrome always has some additional space:
When I add a "-webkit-appearance: none" the arrow disapears but leaves an empty space, so my time is still chopped off.
I have tried many controlls and those solved other issues in Chrome on my desktop (spin-button, clear-button, etc). But nothing I found removes it in Android Chrome.
Does anyone know how to get rid of this?
Tested on Android 5 and 6 both with Chrome 56.
Quick example https://jsfiddle.net/nm97kvk0/2/
I tried this
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
with
::-webkit-inner-spin-button,
::-webkit-outer-spin-button,
::-webkit-clear-button,
::-webkit-calendar-picker-indicator
It works with desktop. There is no arrow in Android Chrome, but background under arrow is still there and overlay part of last digit(
Desktop Chrome
Android Chrome

How tall is 100vh on Android?

I have a site with an element that is 100vh:
height:100%; /* for older browsers */
height:100vh;
This works fine on the desktop browsers I tested it in, as well as in Chrome on Android.
But both in Firefox on Android and the default Android web browser, the element is somewhat taller than the browser tab, maybe (eyeballed) as tall as the window plus the tab header.
Why is that so, and how do I avoid it?
100vh is 100% of viewport height and 100vw is 100% of viewport width.

Android browser displays border wrongly around image with border radius

I'm having some problems with displaying a border around an image correctly. In all browsers, but one, the image tested correctly. The browser that displays problems is my stock browser on my own HTC One (Android KitKat 4.4).
Edit: It works perfectly on the stock browser of the Galaxy S4.
The problem in this browser is that the border is only shown on four points (top, right, bottom, left) and the rest of the border is covered by the image itself. A picture says more than a thousand words so I included two screenshots in the links below.
Basic markup of image:
border-radius: 50%;
border: 1px solid #818d94;
Images:
Stock Android browser (HTC One)
Chrome on Android (HTC One)
Thank you for your time

border-radius style doesn't work in android browser

I created a website, which I intend to display in some mobile devices. The thing is that I have created several menu options as circles.
To achieve this effect I use border-radius in a style sheet, and -webkit-border-radius and-moz-border-radius too.
On the computer it looks well in the browsers I have (firefox and chrome), but when I move to the android browser, these circles are reset to be square divs. This occurs since the load of the page.
may I use other special style for android? Could I need something like the jQuery mobile?
In short I will put the code, but if anyone has gone something like, could share that information, please? thanks
See this post for the answer: Galaxy S4 stock browser CSS3 border-radius support?
Just use the expanded border-left-radius, border-right-radius, etc as a workaround; it's a glitch in the new Android 4+ browser; a bug report has been submitted.
Hi I am using this for gradient. And this works fine in most of the browsers.
`background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#B4DCFA), to(#FF0000));
-webkit-border-radius:11px;
-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.8);
/* For WebKit (Safari, Google Chrome etc) */
/* For Mozilla/Gecko (Firefox etc) */
/* For Internet Explorer 5.5 - 7 */
/*-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#B4DCFA, endColorstr=#FF0000);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#B4DCFA), to(#FF0000));
`
Can you please post the code?

Why is the viewport tag on the Galaxy Nexus / Android 4 not working?

I'm working on a webApp that should resize to any screen size a device could have. On iOS and older android versions the viewport tag works fine. The picture on the screen is always resized to fit the screen.
(Like described here: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW19)
On the Galaxy Nexus (Android 4.0) it won't work. On the left and right side is about 20px space and I don't know why he does this.
My viewport tag looks like this:
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
No matter what I change about the tag, the space is always there and the content doesn't fit to screen.
I've made a sample page to show you the effect: http://easyeve.w3y.de/link/index.html
If you open this link on an iPhone the content perfectly fits (you won't see anything yellow = body) and the document width is 320px. On the Galaxy Nexus you will see yellow space and the document width is 360px (which is exactly half of the display resolution). This should be 320px too!
Do you have this problem too and is there a way to fix it?
Update: I've noticed the same Problem on Galaxy Note / Android 2.3.6
Therefore it's not an Android 4 issue. It has to do with the large screen size I guess..
The very same issue here (Galaxy Nexus - Android 4.0.2), I am talking about regular web page in the default browser
Setting viewport meta initial-scale less then 1 (zoom out) seems to be ignored by the browser. Higher values than 1 (zoom-in) works fine.
There are settings in the browser (settings->advanced) where you can change things:
Default zoom - it makes difference, but it does not fix the issue
Auto-fit pages - in my case makes no difference
Everything seems to work just perfect in Chrome browser (beta at the moment), but that is not default browser for ICS / Galaxy Nexus.
UPDATE (solution):
Setting meta viewport "width=device-width" fails on Galaxy Nexus.
Setting viewport "width=1280" works just great (1280px is width of the screen of galaxy nexus).
Beware that setting "width=1280,user-scalable=no" breaks it again (you can zoom out even if there is user-scalable=no) :(
I ran into something somewhat similar on a Galaxy Tab 2. When setting up your WebSettings for the applcation, try setting webViewSettings.setUseWideViewPort(true); This will force Android to consider the viewport meta tag. It was being ignored in the case of the Galaxy Tab 2 for my app and everything in the viewport was drawing incorrectly until I changed this.
I ended up wrangling with this problem today. My issue was a little bit more complex, because I had to deal with a Wordpress stylesheet (from another theme) in addition to the base CSS. Chrome worked perfectly on my phone and tablet and the stock browser worked fine on the tablet, too. However, the stock browser kept zooming out and showing me the desktop view. There were no margins on either side, which was the correct behavior, but the browser should have removed the floats from my sidebar and content divs and zoomed in to the main content (I'm using #media queries). As weird as it sounds, I actually fixed this by first setting the Zoom setting to Far, refreshing, and then resetting Zoom to Medium and refreshing.
I should point out that when I looked at your page's HTML and CSS, I noticed that you set a specific pixel width for your page div. I'm pretty sure you need to use percentages for width instead. For example, my centered content div has margin: 0 auto;, min-width:320px;, max-width:900px;, and width:100%;.

Categories

Resources