Solved

Force a SELECT list width?

Posted on 2000-03-06
4
360 Views
Last Modified: 2008-02-01
I have a JavaScript that can dynamically add/delete from an HTML SELECT list.  However, the width of this control changes to accommodate the widest text contained within it.

Is there a way to force the width of a SELECT control via JavaScript?

Thanks,

Don
0
Comment
Question by:dmetzler
  • 3
4 Comments
 
LVL 8

Expert Comment

by:xabi
ID: 2590614
Note that this doesn't occurs on NS.
0
 
LVL 8

Accepted Solution

by:
xabi earned 100 total points
ID: 2590624
Here goes the code:

<select name="myselect" size="1" style="width: 20mm">

xabi
0
 
LVL 8

Expert Comment

by:xabi
ID: 2590627
You can get more info here:

http://developer.irt.org/script/858.htm

xabi
0
 

Author Comment

by:dmetzler
ID: 2592091
Thanks!

Don
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question