Growing/Shrinking Text and Checkboxes in MSIE WebDialogs
-
This post is for the next web searcher. My first Google result said that this was impossible. MSIE WebDialogs do not respond to Ctrl/+ and Ctrl/-.
(It may be better to do this in ems. You try it.) Store a default size, in pixels. 12 is a good starting point.
When you create the page, size your text to (default+2). Size your checkboxes (via style) to height=width=default.
textContainer.style.fontSize = (default+2) + 'px'; checkbox.style.width = default+'px'; checkbox.style.height = default+'px';
Provide Expand/Contract buttons. Incr/decrement default and redraw. Increment size 2 seems a good compromise between fine-grain control and getting to the size you want quickly.
-
IE doesn't play nice with pixel values. It refuses to scale the text then. It only scales relative units.
The default font size of pretty much all browsers are 16px. So it's common to set the
font-size
ofhtml
to62.5
% - so that the base font size is 10px. Then you can use em values easier: 1.2em becomes 12px.
Advertisement