checkmeat_09 Posted May 10, 2010 Share Posted May 10, 2010 Hi all,I need ur help to figure out how to solve this.Problem is:In FireFox my code for drop down is working good. But in IE it wont did its job <div class="left"><p><label class="prolabel">Types</label></p></div><div class="right"><select class="ddl" id="packing" name="packing"><option selected="selected">select</option><option>abcdefghijklmnopqrstuvwxyz</option> <option>abcdefghijklmnopqrstuvwxyz</option></select></div> I have css code as .form-details1 select{ width:190px;} Screen Shots are attached.Please i need to solve this now.In Internet Explorer 8 In Firefox Link to comment Share on other sites More sharing options...
Synook Posted May 10, 2010 Share Posted May 10, 2010 What's not working? Remember, you did set its width to 180px. Link to comment Share on other sites More sharing options...
checkmeat_09 Posted May 10, 2010 Author Share Posted May 10, 2010 What's not working? Remember, you did set its width to 180px.u r right.but in firefox the length of options is clearly viewable.But in ie i got exactly the size . it cuts the options length.Do u understand what i am trying to say.Thanks for ur reply. Link to comment Share on other sites More sharing options...
thescientist Posted May 10, 2010 Share Posted May 10, 2010 I would either set a longer width or use shorter option values? Figure out your longest option value and then trial and error the width to meet the requirement of the longest value. Link to comment Share on other sites More sharing options...
ShadowMage Posted May 10, 2010 Share Posted May 10, 2010 What your seeing is a browser specific rendering of an element. A browser decides how to handle the options when they are longer than the width of the select. As far as I know there isn't anything in CSS you can do to make IE render it like FF does.So your only option is to change the width of your select or the length of your options. Link to comment Share on other sites More sharing options...
checkmeat_09 Posted May 10, 2010 Author Share Posted May 10, 2010 What your seeing is a browser specific rendering of an element. A browser decides how to handle the options when they are longer than the width of the select. As far as I know there isn't anything in CSS you can do to make IE render it like FF does.So your only option is to change the width of your select or the length of your options.thanks guys for the replies.So i have to go for javascript to replace the dropdown list.Because i wont able to do shorten the length of options and it may rise some confusionand i wont able to lengthen the width of total select. because i makes my form some damage in view.Thanks and if u figure out any improvements reply me.. Link to comment Share on other sites More sharing options...
thescientist Posted May 10, 2010 Share Posted May 10, 2010 thanks guys for the replies.So i have to go for javascript to replace the dropdown list.Because i wont able to do shorten the length of options and it may rise some confusionand i wont able to lengthen the width of total select. because i makes my form some damage in view.Thanks and if u figure out any improvements reply me..are you getting you're option's dynamically? Link to comment Share on other sites More sharing options...
ShadowMage Posted May 10, 2010 Share Posted May 10, 2010 So i have to go for javascript to replace the dropdown list.Yes, that's likely the route you'll need to take. You'll have to create your list using other elements (a <ul> for example) and use the onclick handler to fire some javascript that will show/hide the <li> elements within your list.The only drawback is that users who have javascript disabled won't be able to use the dropdown at all. So you'd probably do well to come up with something to accommodate those users. Link to comment Share on other sites More sharing options...
checkmeat_09 Posted May 11, 2010 Author Share Posted May 11, 2010 are you getting you're option's dynamically?yes mate..I am getting option's in sql [dynamic] Link to comment Share on other sites More sharing options...
thescientist Posted May 11, 2010 Share Posted May 11, 2010 I'm not sure what kind of performance issues you could run into, but you could test the length of all incoming option values (as strings), check their length and then set the width equal to that value but in em's (of the longest one). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.