Skip to content

Commit d787cff

Browse files
committed
relative not absolute
1 parent 6d882a6 commit d787cff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/javascript.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ <h4 id="three">three</h4>
670670
<h2 id="scrollspy-usage">Usage</h2>
671671

672672
<h3>Requires relative positioning</h3>
673-
<p>No matter the implementation method, scrollspy requires the use of <code>position: absolute;</code> on the element you're spying on. In most cases this is the <code>&lt;body&gt;</code>.</p>
673+
<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>
674674

675675
<h3>Via data attributes</h3>
676676
<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>

0 commit comments

Comments
 (0)