Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the width of Semantic UI dropdown

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.

like image 832
Angular-User Avatar asked Mar 12 '17 16:03

Angular-User


People also ask

How do I disable semantic UI dropdown?

Users can show the dropdown in disabled state and do not grant him to change the state. Semantic UI Dropdown Disabled State Class: disabled: This class is used to set the dropdown status to disabled.

How many types of dropdowns are there?

I also want to clarify that there are two main types of dropdowns: those used for navigation and those used in forms. For this cheat sheet's purpose, we will just be looking at the form variant.

Which UI component allows used to select an item from dropdown menu?

The dropdown list we have used here may appear similar to the dropdowns we have used in our jQuery menu component. The key difference with the dropdown list component is that the currently selected item is always exposed and the purpose is to indicate that the user can toggle between options.

What is dropdown in UI?

Summary: Listboxes and dropdowns are compact UI controls that allow users to select options. Listboxes expose options right away and support multi-selection while dropdowns require a click to see options and support only single-selection.


1 Answers

Try using the 'compact' attribute as shown below. However it only adjusts the width based on what is selected.

<div class="ui compact selection dropdown">
  <i class="dropdown icon"></i>
  <div class="text">Compact</div>
  <div class="menu">
    <div class="item">A</div>
    <div class="item">B</div>
    <div class="item">C</div>
  </div>
</div>
like image 150
AUHReem03 Avatar answered Sep 28 '22 08:09

AUHReem03