Details depend on the specific app and which UI kit you are using, but the general theories are to provide different layouts for different window shapes (landscape, portrait, skinny, etc.) and to use relative layouts so the page can stretch or
scroll within a general screen shape.
See
Defining layouts and views (HTML) and
Defining layouts and views (XAML)