How to size the select boxes in a module

27.12. How to size the select boxes in a module

Figure 27-9. Administration panel: Downloads.

Administration panel: Downloads.

Select boxes (those boxes that present you with multiple options to choose from a dropdown list) are in many places around in PHP-Nuke. An example is the "Modify a Category" select box in the Downloads administration panel (Figure 27-10).

Figure 27-10. Downloads: Add download.

Downloads: Add download.

What if you wish to change the dimensions of such a select box? The code that outputs the select boxes is in admin/modules/download.php. Just search the code there for "<select" and you will see them all.

However, there is no way to manipulate the width of a select box in HTML, other than entering a "dummy" option that has a certain length: the width of a select box is determined by the width of the longest line of text beside an <option>! Thus, there is no way to set the width of select boxes except by manipulating the text tags associated with <option>s.

This leads us to the following tip (see How to Change Width of Modify a Category Drop-Down):

Tip Sizing The select box in Downloads

The very first category that you ever enter in the Downloads Administration Panel should be one with a text long enough to size the box to the desired length. If you choose to enter a "dummy" category like "Choose your Category here" (see Figure 27-11), bear in mind that it will be displayed along with the "right" ones in the Downloads category list.

Figure 27-11. Downloads: Add download.

Downloads: Add download.

Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO


Site Info v2.2.2

Last SeenLast Seen
  • elnegro
  • FireATST
Server TrafficServer Traffic
  • Total: 376,953,187
  • Today: 14,954
Server InfoServer Info
  • Feb 18, 2019
  • 05:36 am CET