13. A method, comprising: receiving a structured document defining a plurality of display elements, the plurality of display elements including a resizable container element and a scalable element defined to be located at least partially within the resizable container element; executing a rendering function that calculates a display position for each of the plurality of display elements; producing rendered content, the rendered content based at least in part on the display position for each of the plurality of display elements; outputting a viewable area of the rendered content; receiving a scaling input; redefining the size of the scalable element according to the scaling input; and selectively redefining the size of the resizable container element based on the display position of the resizable container element with respect to the viewable area of the rendered content by determining whether the resizable container element will be located within the viewable area if resized to completely contain the scalable element, resizing the resizable container element if it will be located within the viewable area, and maintaining the size of the resizable container element if it will not be located within the viewable area.
17. The method of claim 13 , wherein redefining the size of the scalable element according to the scaling input is operable to change the size of the scalable element with respect to the rendered content.