Note that there are some explanatory texts on larger screens.

plurals
  1. POSticky top-bar in Zurb Foundation 5 doesn't work?
    primarykey
    data
    text
    <p>On the documentation here <a href="http://foundation.zurb.com/docs/components/topbar.html" rel="nofollow">http://foundation.zurb.com/docs/components/topbar.html</a>, it says that I should wrap my top-bar <code>&lt;nav&gt;</code> in a div with the class <code>contain-to-grid sticky</code>. My IDE has class auto-completion so I kinda figured out that <code>contain-to-grid</code> class is there but the <code>sticky</code> class doesn't seem to exist. As a result, since it's calling a non-existing class, the top-bar just acts as a regular one.</p> <p>To clarify I am not looking for an immediately fixed top-bar. What I'm aiming for is when I scroll down the page and it went past the position of the top-bar, only then will it stick to the top.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html class="no-js" lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /&gt; &lt;title&gt;&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="css/foundation.css" /&gt; &lt;script src="js/modernizr.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="row"&gt; &lt;div class="column"&gt; &lt;p&gt;Test&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="contain-to-grid sticky"&gt; &lt;!-- This doesn't seem to work. --&gt; &lt;nav class="top-bar" data-topbar&gt; &lt;ul class="title-area"&gt; &lt;li class="name"&gt; &lt;h1&gt;&lt;a href="#"&gt;Title&lt;/a&gt;&lt;/h1&gt; &lt;/li&gt; &lt;/ul&gt; &lt;section class="top-bar-section"&gt; &lt;ul class="left"&gt; &lt;li&gt;&lt;a href="#"&gt;Page 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page 2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page 4&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page 5&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Page 6&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/section&gt; &lt;/nav&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="small-12 medium-9 column"&gt; &lt;p&gt;Main body&lt;/p&gt; &lt;/div&gt; &lt;div class="small-12 medium-3 column"&gt; &lt;p&gt;Sidebar&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;script src="js/jquery.js"&gt;&lt;/script&gt; &lt;script src="js/foundation.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).foundation(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload