1

How to customize the dropdown content of datalist using php and css? I have tried many technique to increase font size but it only shows default style.

here is my code sample

<input type="text" list="itm" name="item" id="item" class="textbox" tabindex="8">

 $item=mysqli_query($con,"SELECT itname,itemcode FROM itementry");
 echo '<datalist id="itm" width="150%">';
 while($row=mysqli_fetch_array($item)){

  $itm = $row['itname'] .'|' .$row['itemcode'];
  echo '<optgroup>';
  echo '<option value="'.$row['itemcode'].'" style="font-size: 50px;">';
   echo $itm;
   echo '</option>';
   echo '</optgroup>';
   }
  echo '</datalist>';

Kindly tell me what should i have to do.Thank you for response.

Ajoy
  • 189
  • 1
  • 5
  • 17
  • No that only increase the size of input box not dropdown list. And thanks for response. – Ajoy Dec 02 '17 at 05:37
  • I search it and found data list styles not that much easy to update. Check once :- https://stackoverflow.com/questions/13693482/is-there-a-way-to-apply-a-css-style-on-html5-datalist-options – Amit Gupta Dec 02 '17 at 05:43

0 Answers0