0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-30 12:24:19 +01:00
Bootstrap/docs/components/dropdowns.md
Mark Otto 9f2aeafe85 Merge branch 'master' into derp
Conflicts:
	Gruntfile.js
	dist/css/bootstrap-theme.css.map
	dist/css/bootstrap.css
	dist/css/bootstrap.css.map
	dist/css/bootstrap.min.css
	dist/fonts/glyphicons-halflings-regular.svg
	docs/_includes/components/badges.html
	docs/_includes/components/input-groups.html
	docs/_includes/components/pagination.html
	docs/_includes/css/forms.html
	docs/_includes/footer.html
	docs/_includes/getting-started/browser-device-support.html
	docs/_includes/getting-started/grunt.html
	docs/_includes/home-nav.html
	docs/_includes/js/alerts.html
	docs/_includes/js/buttons.html
	docs/_includes/js/carousel.html
	docs/_includes/js/collapse.html
	docs/_includes/js/modal.html
	docs/_includes/js/popovers.html
	docs/_includes/js/tooltips.html
	docs/_includes/nav/getting-started.html
	docs/_includes/nav/javascript.html
	docs/assets/css/docs.min.css
	docs/assets/css/src/docs.css
	docs/assets/js/customize.min.js
	docs/assets/js/raw-files.min.js
	docs/browser-bugs.html
	docs/dist/css/bootstrap-theme.css.map
	docs/dist/css/bootstrap.css
	docs/dist/css/bootstrap.css.map
	docs/dist/css/bootstrap.min.css
	docs/dist/fonts/glyphicons-halflings-regular.svg
	fonts/glyphicons-halflings-regular.svg
	less/_button-group.less
	less/_jumbotron.less
	less/_variables.less
	less/mixins/vendor-prefixes.less
	less/panels.less
	less/thumbnails.less
	package.json
2014-09-17 15:21:31 -07:00

3.1 KiB

layout title
page Dropdowns

Toggleable, contextual menu for displaying lists of links. Made interactive with the [dropdown JavaScript plugin]({{ site.bsaeurl }}javascript/#dropdowns).

Example

Wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then add the menu's HTML.

{% example html %}

{% endexample %}

Alignment

By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add .dropdown-menu-right to a .dropdown-menu to right align the dropdown menu.

May require additional positioning

Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain overflow properties or appear out of bounds of the viewport. Address these issues on your own as they arise.

{% highlight html %}

    ...
{% endhighlight %}

Menu headers

Add a header to label sections of actions in any dropdown menu.

{% example html %}

{% endexample %}

Menu dividers

Separate groups of related menu items with a divider.

{% example html %}

{% endexample %}

Disabled menu items

Add .disabled to a <li> in the dropdown to disable the link.

{% example html %}

{% endexample %}