Bug: FullScreen Image dont center


#1

Type: bug

Platform: mobile webview

I´m using this Codepen

In browser works great

https://meocloud.pt/link/ffe1f747-2fa4-4a07-82b3-9c92e4710372/Imagem_Alinhada.jpg/

In Mobile (only test Android) stay in top/left of screen

https://meocloud.pt/link/5171fa07-a541-4f5d-af8f-5cc47bce6562/Imagem_NaoAlinhada.jpg/

Please help to align the image like browser.

Thanks
Baltazar


#2

Which version of android were you using? Position:fixed has very poor support on early mobile devices. If you need fullscreen, rather use position:absolute with top,bottom, left and right alle set to 0px, because this is supported :wink:

Poor position:fixed support is also the reason why many frameworks have problems with implementing “fixed” footers and headers, although ionic seems to do this great!


#3

I have test in Android 4.3 and Android 4.2.2

I have changed the Css to absolute. Work in Chrome,

i will try in Mobile later. I will give feedback,

Thanks


#4

In android 4 and higher there should be partial or complete support for fixed. But it’s better not to use it since iOS has it’s own differences with how you’d suspect it and besides that android 2.x doesn’t support it at all. I’m curious wether it works now :slight_smile: Position:fixed is a no go for mobile apps with intended support for a broad audience. Hopefully this will be better in a few years =P


#5

It working.

Thanks a Lot

:smiley:


#6

Very welcome, nice to be of help :smile: