Semantic-ui: [Dropdown] Add functionality to configure positioning

Created on 2 Feb 2016  路  12Comments  路  Source: Semantic-Org/Semantic-UI

Dropdowns can sometimes be placed in corners, causing the items to go off the screen when the dropdown is active. Being able to specify the positioning can help to resolve this problem.

The same functionality with popups would be sufficient.
http://semantic-ui.com/modules/popup.html#positioning

See below for an example of a dropdown being used in the top-right corner of a menu.
screen shot 2016-02-02 at 5 08 30 pm

Most helpful comment

add style="right: 0;left: auto;" into dropdown menu.

All 12 comments

You can configure if you want your dropdown menu to open right or left.

If that didn't solve your problem, could you provide a JsFiddle with a problematic case?

That seems to only resolve the issue with sub-menus. Here is the JSFiddle:

http://jsfiddle.net/cs3j0zvj/1/

@fpayer If you are using a "pointing dropdown" you need to tell it where the "pointing" is, in this case "top right" :)

<div class='ui pointing dropdown top right' id='user'>
       <div class='text'>User</div>
       <i class='dropdown icon'></i>
       <div class='menu'>
          <div class='item'>User Settings</div>
          <div class='item'>Team Settings</div>
          <div class='item'>Redeem Game Code</div>
       </div>
 </div>

http://jsfiddle.net/ypvpajrL/

Ah, ok. Wish this was more clear in the docs. I notice now that the property is used when displaying other features of dropdown, but there is no explicit example of that feature in the docs.

roger that!

@jlukic, add this to the overflowing list of _Things to do Examples About_! :joy_cat:

3716

Sorry to bring up an old topic:

Is there a way to resolve this _without_ using pointing? With pointing top right, the menus appear just fine if my menu is in the top right corner. But without pointing, the menu goes off-screen.

It's not an old topic if it still hasn't been resolved. Any update on this issue?

After several hours of head scratching, adding "pointing top right" solved my problem. Wish this was included in the docs.

add style="right: 0;left: auto;" into dropdown menu.

@nicely You've made my day! Thank you.

@nicely You've helped me make my first PR. Thanks!.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iPaoo picture iPaoo  路  3Comments

ghost picture ghost  路  3Comments

deneuxa picture deneuxa  路  3Comments

larsbo picture larsbo  路  3Comments

zhaoyao91 picture zhaoyao91  路  3Comments