Solved

Drop-down List Box Width

Posted on 2000-02-29
7
422 Views
Last Modified: 2013-12-24
I have a web page that has drop-down list boxes.  Their width auto-sets depending on the width of the data in the list.  How do I manually set the list box to a certain width rather than letting the box auto-set its own width?
0
Comment
Question by:dekkyb
[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
7 Comments
 
LVL 4

Expert Comment

by:NickRackham
ID: 2569381
right click the box, and choose Form Field Properties, then specify the width. I think the standard is 20.
0
 

Author Comment

by:dekkyb
ID: 2570044
If you right click the box and choose Form Field Properties, there is no option to specify the width.  There is height, tab order, and name.
0
 

Author Comment

by:dekkyb
ID: 2570049
Adjusted points to 300
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 3

Expert Comment

by:fibdev
ID: 2570449
The only way I've found too do this is to add spaces after the first menu item until it is the desired width.  It's kinda' sloppy, but it works.

Example:

  <p><select size="1" name="D1">
  <option>
Choice One&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </option>
  <option>Choice Two</option>
  <option>Choice Three</option>
  &nbsp;
  </select></p>
0
 
LVL 3

Expert Comment

by:fibdev
ID: 2570460
Didn't paste right :(

here:

<p>
  <select size="1" name="D1">
    <option>
    Choice One&nbsp;&nbsp;&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;
    </option>
    <option>Choice Two</option>
    <option>Choice Three</option>
  </select>
</p>


0
 
LVL 1

Accepted Solution

by:
MikeyG earned 300 total points
ID: 2570827
The trick here, I think, is to set the sizing of the control using absolute positioning.  You can do this by performing the following steps:

1:  Double click on your drop down box to get the properties up
2:  Click on the 'Style' button in the left hand corner of the window.
3:  Click on the 'Format' button, and then select 'Position...'
4:  Now you can choose how the form field is positioned on the screen, and in addition, its size.  For your needs, select the 'Relative' option under 'Positioning Style'.
5:  Enter the width of the combo in pixels.  (You can resize it later if needed, so just enter 100 for the time being)
6:  Click ok on all the windows to get back to the design view of your page.
7:  You can now resize the combo box by dragging on its corners/edges.

Hope that helps...
0
 

Author Comment

by:dekkyb
ID: 2573454
I had talked to a number of individuals that have experience with web page design and implementation and none of them knew how to do this.  It works perfectly.

Thanks very much!!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

740 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