mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-02 02:29:24 +01:00
update docs on fixed nav per #1726
This commit is contained in:
parent
5fc62c5fcc
commit
81d101a6a7
Binary file not shown.
@ -815,12 +815,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
<p>To make the navbar fixed to the top of the viewport, add <code>.navbar-fixed-top</code> to the outermost div, <code>.navbar</code>. In your CSS, you will also need to account for the overlap it causes by adding <code>padding-top: 40px;</code> to your <code><body></code>.</p>
|
<h3>Fixed navbar</h3>
|
||||||
|
<p>To make the navbar fixed to the top of the viewport, add <code>.navbar-fixed-top</code> to the outermost div, <code>.navbar</code>.</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
...
|
...
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>In your CSS, you will also need to account for the overlap it causes by adding 40px or more of padding to your <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.</p>
|
||||||
<h3>Brand name</h3>
|
<h3>Brand name</h3>
|
||||||
<p>A simple link to show your brand or project name only requires an anchor tag.</p>
|
<p>A simple link to show your brand or project name only requires an anchor tag.</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
|
4
docs/templates/pages/components.mustache
vendored
4
docs/templates/pages/components.mustache
vendored
@ -739,12 +739,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
<p>{{_i}}To make the navbar fixed to the top of the viewport, add <code>.navbar-fixed-top</code> to the outermost div, <code>.navbar</code>. In your CSS, you will also need to account for the overlap it causes by adding <code>padding-top: 40px;</code> to your <code><body></code>.{{/i}}</p>
|
<h3>{{_i}}Fixed navbar{{/i}}</h3>
|
||||||
|
<p>{{_i}}To make the navbar fixed to the top of the viewport, add <code>.navbar-fixed-top</code> to the outermost div, <code>.navbar</code>.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
...
|
...
|
||||||
</div>
|
</div>
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>{{_i}}In your CSS, you will also need to account for the overlap it causes by adding 40px or more of padding to your <code><body></code>. Be sure to add this after the core Bootstrap CSS and before the optional responsive CSS.{{/i}}</p>
|
||||||
<h3>{{_i}}Brand name{{/i}}</h3>
|
<h3>{{_i}}Brand name{{/i}}</h3>
|
||||||
<p>{{_i}}A simple link to show your brand or project name only requires an anchor tag.{{/i}}</p>
|
<p>{{_i}}A simple link to show your brand or project name only requires an anchor tag.{{/i}}</p>
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user