Topic: Select form / Different width when using IE and FF

I'm having a problem regarding my select form in my site. Here's A PART of my site where I'm having problems with:

<select id="course" name="course" style="width:155px">
   
<option value="" selected="selected" disabled="disabled" id="select_course">Select course</option>

       <option class="sms_option" disabled="disabled">College of Computer Studies</option>
    <option>B.S. Computer Science</option>
            <option>B.S. Information Technology</option>
                <option>B.S. Information Management </option>

When I'm using Mozilla Firefox, the SELECT form auto re sizes itself when I click the button. To the point where all of the text in the OPTION element can be read and comes back to it's normal size once I'm done selecting and that's great, no problem with that. THE PROBLEM IS when I'm using Internet Explorer, it doesn't work. What I mean is the SELECT form only has the width of 155px, ( which I set ) so in that case, I can't read the OPTIONS text completely. How can I fix this? I hope someone can help me with this problem. Cheers!

Last edited by jtified (2009-08-21 04:48:53)

Re: Select form / Different width when using IE and FF

I'm not sure what you mean by auto resizing in Firefox. I tried a form of mine with a width for the select box which was less wide than needed for the options text and it didn't resize to show all the content.

I suggest that you make the select box the width it needs to be to show all the option text.

Re: Select form / Different width when using IE and FF

http://i533.photobucket.com/albums/ee333/jhustified_photo/firefox_ss.jpg

http://i533.photobucket.com/albums/ee333/jhustified_photo/ie_ss.jpg

Here's what I meant.

Re: Select form / Different width when using IE and FF

This is one solution using jquery (I'm sure it could be done with regular javascript too)

http://css-tricks.com/select-cuts-off-o … in-ie-fix/

Re: Select form / Different width when using IE and FF

So there's no good fix using CSS here..*sigh*. Thanks a lot though.