/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<link rel="stylesheet" type="text/css" href="stylesheets/iphone_portrait.css" id="orient_css"> <script type="text/javascript" charset="utf-8"> function orient() { switch(window.orientation){ case 0: document.getElementbyId("orient_css").href = "stylesheets/iphone_portrait.css"; break; case -90: document.getElementbyId("orient_css").href = "stylesheets/iphone_landscape.css"; break; case 90: document.getElementbyId("orient_css").href = "stylesheets/iphone_landscape.css"; break; } } window.onload = orient(); </script> <body onorientationchange="orient();">