0 Replies Latest reply on Aug 29, 2011 11:54 AM by ACS LLC

    Centering HTML in mobile phone environment

    ACS LLC Level 1

      I am working on an Android application that will draw HTML from the CF server and display it within the app.

       

      The issue I have is that under some occassions the HTML we serve to the app will not fill the whole screen of the phone, other times it will and the user can scroll through the content.

       

      What I want to try and do is vertically center the HTML within the mobile screen. There will be multiple devices, from phones to tablets that could potentially see this content, so I can't just set up a TD down the side with a fixed height, because it will be ok in one device and not in another. This might have to be something programmed into the application itself, but I'm just wondering if anybody has ever had to do anything similar and have some sort of solution?

       

      After posting this thread it looks like I have a solution that works in Android, found here

      http://tom.me.uk/html-to-css/center-vertically.html

       

      using <table height=100%>

       

      Thanks

       

      Mark