Our app has a very complex layout. I ended up having to write a special layout function which is triggered by the orientationchange and pagechange events. The layout function tweaks the css of significant elements in the page to ensure the layout is good in portrait or landscape.
Make sure you also set the viewport meta tag in your page, appropriate to how you want your page to be viewed:
Mine looks like this, with the intention that the form is a 'fixed' full-screen layout and always fits width-ways, and cannot be sized by the user:
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
In my layout code, I adjust the heights of the page elements to fill the available horizontal space. If you do nothing, the phone will either extend or clip your content vertically.