Solved

Drop-down List Box Width

Posted on 2000-02-29
7
424 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
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 insert an Iframe into 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 : Open Page or Post…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

691 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