Solved

Force a SELECT list width?

Posted on 2000-03-06
4
363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

734 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