aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorKevin Kirsche <[email protected]>2015-05-14 19:06:00 -0400
committerKevin Kirsche <[email protected]>2015-05-30 18:24:23 -0400
commit962ae5ac2fb9f291ae7c6a60d8c5d0e00323de8d (patch)
tree8c3f1f60e5e29caabd7564ab31d4d428c188a48b /docs/_includes
parent588b7e564eee09bccc85d4756309f63ac3d004b7 (diff)
downloadbootstrap-962ae5ac2fb9f291ae7c6a60d8c5d0e00323de8d.tar.xz
bootstrap-962ae5ac2fb9f291ae7c6a60d8c5d0e00323de8d.zip
[Close #16441] ScrollSpy requires non-body elements to have height and padding
[Close #16441] ScrollSpy requires non-body elements to have height and padding
Diffstat (limited to 'docs/_includes')
-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 afac356e1..ab23e312a 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>