0
<select class="form-control selectpicker" data-live-search="true" id="dynamic-select" >
    <option value=""  style="bold"> </option>
    <option value=""  style="bold">Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name </option>
    <?php
            include "config.php";
            echo $sup_code="select * from supplier where status='active' order BY su_code ASC";
            $sel_sup_code = mysql_query($sup_code) or die(mysql_error());
            while($row_sup_code=mysql_fetch_array($sel_sup_code))
            {
            ?>
               <option value="supplier.php?selectedid=<?php echo $row_sup_code['id']; ?>" >
               <li>&nbsp;&nbsp; <?php echo $row_sup_code['su_code']; ?> </li>&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;<li> <?php echo $row_sup_code['su_name'] ?> </li> 
               </option>
            <?php
            }
           ?>
</select>
Dhara Parmar
  • 8,021
  • 1
  • 16
  • 27
  • 1
    Please refer http://stackoverflow.com/questions/13931571/how-can-change-width-of-dropdown-list – Anish Chandran Jun 11 '16 at 06:20
  • i want all option in one line and in fixed width like as code...some space...name...some space...City....like 01 Diamond New York or if this is not possible then tell me how i drae a table in dropdown using mysql data – Ankur Sheth Jun 11 '16 at 06:33
  • Why did you use
  • ? just append values in option tag with space
  • – Anish Chandran Jun 11 '16 at 06:57
  • but i dont want space between two.....fixed width?...so – Ankur Sheth Jun 11 '16 at 07:23