You are here: Re: Options in select Box « HTML « IT news, forums, messages
Re: Options in select Box

Posted by Jonathan N. Little on 10/23/06 17:43

John wrote:
> "> No, wrong. Size for the SELECT element determines the number of *rows*
>> displayed and not the number of *characters* as with text inputs...

>
> Yes, I agree, but when you display all the rows (5 in this case) the row
> with the maximum number of characters will determine the width of the drop
> down menu.

But this does not address what the OP asked. The question was how to
specify the *width* of the SELECT element not the number of *rows*

To the OP the problem is that you cannot specify a different width for
the SELECT and OPTION elements. In IE, the width of the SELECT
constrains the OPTION elements within so

<style type="text/stylesheet">
SELECT { width: 60px; }
OPTION { width: auto; }
</style>

Will 'work' in Firefox, but in IE the OPTION list will not expand but
will also be 60px wide. My advice, adjust you layout so a variable width
SELECT will look acceptable and not try to constrain it.

> Or, alternatively, he could wrap the select in a table <td width="12%">. I
> say table knowing that this is deprecated in preference to CSS and div's.
> But same idea.

Sorry, but what the hell will that do? The TD will not constrain the
OPTION list, just the opposite the TD's default behavior is to expand to
accommodate the contents.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация