Created
January 1, 2012 17:17
-
-
Save macdonst/1547814 to your computer and use it in GitHub Desktop.
RWD example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<style type="text/css"> | |
@media all and (min-width: 801px) { | |
#wrapper { | |
width: 80%; | |
margin: auto; | |
} | |
#main { | |
margin-left: 40%; | |
} | |
#sidebar { | |
width: 40%; | |
float: left; | |
} | |
} | |
@media all and (max-width: 800px) { | |
#wrapper { | |
width: 90%; | |
min-width: 0; | |
} | |
#main { | |
margin-left: 0; | |
} | |
#sidebar { | |
width: auto; | |
float: none; | |
} | |
} | |
</style> | |
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
function onBodyLoad() { | |
document.addEventListener("deviceready",onDeviceReady,false); | |
}; | |
// PhoneGap is ready | |
// | |
function onDeviceReady(){ | |
console.log("Width = " + window.innerWidth); | |
console.log("Height = " + window.innerHeight); | |
} | |
</script> | |
</head> | |
<body onload="onBodyLoad();"> | |
<div id="wrapper"> | |
<div id="sidebar"> | |
sidebar | |
</div> | |
<div id="main"> | |
main | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment