When I view the following html file with Safari on iphone, it does not display the entire width of the content as it intended:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>iOS Viewport Test</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <style type="text/css"> body #wrap { width: 1008px; border: 1px solid #000; } h1 { font:30px sans-serif; } </style> </head> <body> <div id="wrap"> <h1>Here some quite eloooongated text that should make the screen at least 1008px wide or more</h1> </div> </body> </html>
Can anyone see what I'm doing wrong? What it's worth, I have iOS 6.1 and Safari 6.0
source share