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-sizeofhtmlto62.5% - so that the base font size is 10px. Then you can use em values easier: 1.2em becomes 12px.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement