I created a simple construction website that has an image and some text in the center of the page, for example:
HTML code:
<body> <div id="container"> <span id="wip">Under Construction</span> <img id="image" src="katte.jpg"> <span id="text">Glæd dig, her åbner katteboxen.dk i foråret 2015. Vi glæder os til at forkæle din kat med en spændende pakke hver måned.</span> </div> </body>
CSS code:
body { margin: 0; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-weight: 700; text-align: center; } #container { max-width: 1230px; width: 100%; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } #image { width: 100%; } #text { font-size: 20px; padding: 0 15px; display: block; } #wip { font-size: 40px; padding: 0 15px; display: block; }
Link: http://katteboxen.dk/
Everything works well, except when it comes to iPads. The content is displayed, for example, when, for example, the css transform: translate(-50%, -50%); rule transform: translate(-50%, -50%); not applied to container. What are the alternatives to fix this problem? Any recommendations or feedback are more than welcome.
html css html5 css3 ipad
Mariusnv
source share