If I open my (GWT) page in a normal browser, everything works fine. The body takes the whole width and the content is nicely centered. But if I try this on a mobile phone, the body does not take the whole width and therefore the content is not centered.
I couldn't find out why it is being displayed like this. Also, adding 100% width to body and html tag does not solve the issue .
Is there a way to get this working nicely on a mobile device?
The page can be reached under: http://www.vegantastic.de/
Just use top:0; and left: 0; and you can also eliminate padding: 0 . Don't use top: 0; for other div except top, use left: 0; for other div for eliminate the left space.
What you could do is set your div to be position: absolute so your div is independent of the rest of the layout. Then say width: 100% to have it fill the screen width. Now just use margin-left: 30px (or whatever px you need) and you should be done.
this was driving me crazy and i just solved it by adding position:fixed
to the body
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With