How to set the width of Semantic UI dropdown

Angular-User picture Angular-User · Mar 12, 2017 · Viewed 8.6k times · Source

How can I set the width of the Semantic UI Search Selection drop down? I need to set the width of Semantic UI Search selection dropdown to the longest element in the dropdown. Any help will be appreciated.

Answer

bjornl picture bjornl · Mar 22, 2017

I used a fixed-size wrapper combined with a fluid (expands to fit size of parent) dropdown nested inside of it

<div style="width: 250px;">
  <div class="ui fluid dropdown">
    <input type="hidden" name="country">
    <div class="default text">My Dropdown Text</div>
  </div>
</div>