0

A box of codes of phone number of different countries pops up. As you can see there is some space left in table and my question is how to change the size of this table to make is smaller in. I tried in CSS "optgroup[label="Countries"] { width: height: }" but still it does not work. But when I change the color of background, is works. Can you please help me. Thank you in advance.

 <select name="countryCode" id="countryCode">
 <optgroup label="Countries">
 <option data-countryCode="GB" value="44" Selected>UK (+44)</option>
 <option data-countryCode="US" value="1">USA (+1)</option>
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="CF" value="236">Central African Republic (+236)</option>
</select>
  • 1
    Possible duplicate of [How to style the – hungerstar Apr 28 '17 at 20:37
  • I think `` is relative in size to ``'s width. Not sure about height, however. –  Apr 28 '17 at 20:38
  • I tried to change the width of –  Apr 28 '17 at 20:59

1 Answers1

0

If you target the width of select#countryCode, width changes for me even on the popup. It just can't be smaller than the space required by the largest word/words in the dropdown.

MarkM
  • 3
  • 1
  • 1
  • 5