You are here:  » Width of the select box

Support Forum



Width of the select box

Submitted by henk on Thu, 2008-10-30 20:29 in

How can i make a equal select box.

this is a part from my widget php

print "<select size='5' onchange='JavaScript:this.form.submit();' name='".$name."'>";
    if (!$array[$default] && $null_option)
    {
       echo("<option value=''>".$null_option."</option>");
    }
    foreach($array as $k => $v)
    {
      if ($default == $k)
      {
        $selected = "selected='selected'";

http://www.linkik.com/category/Telefonie/

THX HEnk

Submitted by support on Fri, 2008-10-31 10:25

Hello Henk,

You can use the CSS width attribute for a select box; for example:

print "<select style='width:150px;' size='5' onchange='JavaScript:this.form.submit();' name='".$name."'>";

Cheers,
David.