aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2015-05-30 17:32:20 -0700
committerMark Otto <[email protected]>2015-05-30 17:32:20 -0700
commitb5b4c9c701ec72b645374e161cfaf9ec84ab73a5 (patch)
tree1787514199f8d0d6453bd948688911210c2b3291 /docs
parentd0fc465c181892369adb96ca1c695f85b011feba (diff)
parent962ae5ac2fb9f291ae7c6a60d8c5d0e00323de8d (diff)
downloadbootstrap-b5b4c9c701ec72b645374e161cfaf9ec84ab73a5.tar.xz
bootstrap-b5b4c9c701ec72b645374e161cfaf9ec84ab73a5.zip
Merge pull request #16484 from kkirsche/patch-13
ScrollSpy requires non-body elements to have height and overflow…
Diffstat (limited to 'docs')
-rw-r--r--docs/_includes/js/scrollspy.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/_includes/js/scrollspy.html b/docs/_includes/js/scrollspy.html
index adcce1f29..135d7c5cf 100644
--- a/docs/_includes/js/scrollspy.html
+++ b/docs/_includes/js/scrollspy.html
@@ -65,7 +65,7 @@
</div>
<h3>Requires relative positioning</h3>
- <p>No matter the implementation method, scrollspy requires the use of <code>position: relative;</code> on the element you're spying on. In most cases this is the <code>&lt;body&gt;</code>.</p>
+ <p>No matter the implementation method, scrollspy requires the use of <code>position: relative;</code> on the element you're spying on. In most cases this is the <code>&lt;body&gt;</code>. When scrollspying on elements other than the <code>&lt;body&gt;</code>, be sure to have a <code>height</code> set and <code>overflow-y: scroll;</code> applied.</p>
<h3>Via data attributes</h3>
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code>&lt;body&gt;</code>). Then add the <code>data-target</code> attribute with the ID or class of the parent element of any Bootstrap <code>.nav</code> component.</p>