Zen Cart Logo
Forums / Basic Configuration / How to make drop down menus the same size?

How to make drop down menus the same size?

Views: 1,800

Results 1 to 5 of 5
22 Mar 2011, 8:23 AM
#1
ironsidecomputers avatar

ironsidecomputers

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

How to make drop down menus the same size?

Hey everyone. So far, I'm doing very well on learning how to use Zen Cart, but there's one thing I can't figure out how to do. This is probably really easy for you guys, but I just can't seem to figure out how to make the drop down menus for my option values the same size. They just seem to be as long as the option values in them. So, my question is how do I set a specific length for my drop down menus, so they are all the same size.

Thanks,
Robert

22 Mar 2011, 8:29 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to make drop down menus the same size?

The html select tag that is used to display them on the page can take a "size" parameter that specifies how many options are displayed before the dropdown is converted to a scroll box (subject to the limits of each browser).

You can see an example of how this is done in the manufacturers sidebox where the size is restricted by default to 3 items.

22 Mar 2011, 8:36 AM
#3
ironsidecomputers avatar

ironsidecomputers

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

Re: How to make drop down menus the same size?

Thank you for kuroi for answering, but I'm not exactly clear what I have to do. If you can explain what I would have to do, I would really appreciate it.

22 Mar 2011, 7:28 PM
#4
ironsidecomputers avatar

ironsidecomputers

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

Re: How to make drop down menus the same size?

Any help?

23 Mar 2011, 9:01 AM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to make drop down menus the same size?

This is a code change so will require some developer skills though only at a beginner level.

You need to locate the code that is generating the your option pulldowns. This will most likely be done by a call to the zen_draw_pulldown_field function. The developers toolkit in the Admin > Tools menu will help you to find this.

Then you need to add the HTML size attribute to the parameters for that call. Taking a look at the code that generates the manufacturers sidebox pulldown will show you how.