On Nov 4, 2007, at 5:27 AM, James Jeffery wrote:
Hi all
I have a select box that has a greater width and hight then the
standard size. I am trying to center the default option that displays
in the select box. I have tried padding: xem 0; and it centers the
options when the list is displayed, but the default option does not
change.
Basically i want to center (vertically) the default option in a
select box.
Anyone got any ideas i have tried for a while and can't get it to
work.
When I run into this problem, I declare width for 'select'.
select {width: 250px}
If I want to style the option values in Firefox, I add a class like so
.option {border-bottom : 1px solid #efefefe; padding: 3px
;width: 250px}
If a class is added, I don't declare width in 'select'.
IMHO, this looks so much better than making text center just for the
Gecko based browsers. I do care the aesthetic inspiration, but using
JS to overwrite browser default for option attribute isn't something
I aspire :)
'width' works for all browsers I have tested : Safari, IE, Opera,
Firefox and Camino
'text-align' only work in Opera and Firefox. In Camino, only the
first option value works.
tee
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************