Re: Determining number of visible OPTIONs in a SELECT
"John M. Hann" <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Sorry. Just seeing your prevous response now. --- In [email protected], Ian Petersen <ispeters@g...> wrote: > > IE makes it really hard to work this out because it changes the font size to fit the client height of > > the select, ignoring any style properties. > > I'm not sure what you mean here. I realize most styles are ignored on > OPTIONs, but what do you mean that IE changes the font size? If I > have a bunch of SELECTs on the page, each with a different > .style.height, the font size is the same on all of them, isn't it? Here's what I meant: If you do something like: select.style.fontSize = '12px'; select.style.height = '50px'; IE 6 will resize the font (ignoring -- or "adjusting" on might say -- your '12px') so that a whole number of options fit within the select. It does this to prevent a partial option from showing at the bottom. You can try this easily. Change the '12px' to '10px' and the font doesn't change. Change it down to '8px' and it finally changes -- but it's probably not actually 8px. It's whatever fits a whole number of options. Therefore, if you have several selects on a page, each with a different height, the height of the options in each may be different. Regards, -- John http://e-numera.com/ [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM --------------------------------------------------------------------~-> Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/