cesarcesar Posted May 19, 2007 Share Posted May 19, 2007 I have a page where the <select> is very screen right. it has little room to show the full name in the <option> so i do like "S - Summary". You only end up seen the S. When the dropdown happens, my clients wants to see the whole name. This works in FF, but not IE. Can i via CSS control the location of the options. Say move them left 50px. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/52099-how-can-i-control-the-location-of-html-select-option/ Share on other sites More sharing options...
dbrimlow Posted May 19, 2007 Share Posted May 19, 2007 Yes. Create a class for your select and put it in an "ie-only.css" file. .select { margin-right:50px; } Then use a conditional expression in your <head> after any other css links or commands to call the css file if the browser is IE (this way it doesn't change how it looks in FF). <!--[if lt ie 6]> <link rel="stylesheet" type="text/css" media="screen" href="ie-only.css" /> <![endif]--> For the actual select tag, simply add the class, <select name="select" class="select"> Quote Link to comment https://forums.phpfreaks.com/topic/52099-how-can-i-control-the-location-of-html-select-option/#findComment-257081 Share on other sites More sharing options...
cesarcesar Posted May 20, 2007 Author Share Posted May 20, 2007 dbrimlow: the way you have shown moves the whole <select>. i want to move just the <option>'s that are shown. It would be great if this worked, <option style="margin-right:50px;"> Quote Link to comment https://forums.phpfreaks.com/topic/52099-how-can-i-control-the-location-of-html-select-option/#findComment-257829 Share on other sites More sharing options...
cesarcesar Posted May 20, 2007 Author Share Posted May 20, 2007 or.. how can i set the width of the <select> to *ONLY* effect the initial selection and not the drop down. Quote Link to comment https://forums.phpfreaks.com/topic/52099-how-can-i-control-the-location-of-html-select-option/#findComment-257834 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.