this is a simple html + css question:
My 620px tall div with bottom: 0px is not scrollable in android-browsers - it hangs on the bottom, the top is missing and not reachable. Tested with Android 4.4.2 on my tablet (1280x800) in Firefox, Crome an "Internet"-Browser.
This is what I want: * the div at bottom on large not mobile screens * the whole content scrollable on mobile screens
Here is my code:
<html> <head> <style type="text/css"> * { margin: 0; padding: 0; } html, body { height: 100%; width: 100%; } </style> </head> <body bgcolor="white" text="white"> <div style=" position: absolute; width: 900px; height: 620px; left: 50%; margin-left: -450px; bottom: 0px; background-color: green; "> a tall container </div> </body> </html>
Thanks for your help and attention..
Try, giving position:relative;
to the parent div or body in your above code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.