Solved

Force a SELECT list width?

Posted on 2000-03-06
4
359 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now