Changes

896 bytes removed ,  08:22, 3 June 2012
m
Line 119: Line 119:     
In vertical mode, you can have a page span both screens. However, the browser will behave as if the bottom screen is the only active screen and the top screen is scrolled off. This is important when computing CSS coordinates. Items positioned from "bottom" will be positioned based on 176px and not the full 352px of both screens.
 
In vertical mode, you can have a page span both screens. However, the browser will behave as if the bottom screen is the only active screen and the top screen is scrolled off. This is important when computing CSS coordinates. Items positioned from "bottom" will be positioned based on 176px and not the full 352px of both screens.
  −
== Using Both Screens ==
  −
  −
Here's how your webpage can span both screens:
  −
  −
# Use the meta tag to set vertical mode
  −
# Ensure that your page takes up exactly 240x352 pixels.
  −
# Add the following JavaScript just before the </body> tag:
  −
  −
<script type="text/javascript">document.body.scrollTop = 176;</script>
  −
  −
Generally the easiest way to accomplish the correct layout is to create HTML elements that "contain" the top and bottom screens. Here's an example:
  −
  −
<html>
  −
  <head>
  −
    <meta name="viewport" content="width=240" />
  −
    <style type="text/css">
  −
      body { margin: 0px; }
  −
      #topscreen, #bottomscreen { width: 240px; height: 176px; overflow: hidden; }
  −
    </style>
  −
  </head>
  −
  <body>
  −
    &lt;div id="topscreen">Top Screen&lt;/div>
  −
    &lt;div id="bottomscreen">Bottom Screen&lt;/div>
  −
  </body>
  −
</html>
  −
  −
This scheme allows the page to be easily manipulated through JavaScript.
      
== Example Sites ==
 
== Example Sites ==
10

edits