Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE -> FF -> Opera (Select Lists) 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Is it me or can you not make select lists the same width in all browsers with one CSS statement?

eg.
Code:
select {
padding:0px;
margin:0px;
display:block;
float:left;
width:200px;
}

Yet the select list displays a different width in all three browsers.

Is this just something you have to put up with or am I doing something wrong?

cheers,
1DMF


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Hi

1DMF said:
Yet the select list displays a different width in all three browsers.
There should be only two different sizes, because standard compliant browsers respect the imposed size :

select-width.png


By the way, in your Opera what is the status of Tools | Preferences | Content | Style Options | Enable styling of forms ?

Feherke.
 
If we are talking the drop down boxes:
IE6, IE7, FF2, FF3, Opera9, Google Chrome and Safari 4 (beta) all render it the same size.

even when the text contained in an option far exceeds 200px, it still doesn't change size.
in all browsers (except IE) the text is not truncated to 200px when you click on the select list.

if we are talking select multiple:
all the browsers listed above render the same dimensions, but FF2&3 and Safari add a scrollbar to it.

________________________________
Top 10 reasons to procrastinate:
1)
 
I can't find that in my Opera menu?

I have Tools->Preferences...

General, Wand, Search, Web Pages, Advanced

But they are definately all different in my browsers..

no wait, i'm a complete jackass! .... I went to copy paste the code for the global select CSS and found a min-width:100px; , what a plonker, I missed that, and as I found out the hard way on another thread IE7 stopped adhering to the min-width attribute for some strange reason.

Well, now i've taken it away, I got a whole load of re-arranging to do... do'h!

thanks for the help.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
 http://www.homeloanpartnership.com/selects.gif
no worries, thanks.

I can't beleive the circles i've been going in trying to line up my form, now everything is slotting nicely into place on all browsers!

Damn you IE! and your standards compliance flakeyness

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top