Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create column with two divs one fixed above second that hides behind first when scrolling?
    primarykey
    data
    text
    <p>How to create container sticking to navbar with the same width like parent column in responsive design? When link in first div was clicked then content div will be scrolled to right height so that content hides behind <code>hr</code> and links div. All this in one column.</p> <p>I've created starting template <a href="http://jsfiddle.net/smUx8/3/" rel="nofollow noreferrer">jsfiddle</a></p> <p>My desired effect: <img src="https://i.stack.imgur.com/aEtyM.png" alt="mockup"></p> <p>Current bad HTML:</p> <pre><code>&lt;div class="navbar navbar-fixed-top"&gt; &lt;div class="navbar-inner"&gt; &lt;div class="container"&gt; &lt;form class="navbar-search pull-right"&gt; &lt;input type="text" class="search-query" placeholder="Search" /&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;div class="content"&gt; &lt;div class="row"&gt; &lt;div class="span9"&gt; &lt;div class="hidebehind"&gt; &lt;div class="push"&gt; &lt;div class="row"&gt; &lt;div class="well links"&gt; &lt;div class="span3"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#scroll1" rel="" id="scroll2" class="scroll"&gt;scroll to 1&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#scroll2" rel="" id="scroll2" class="scroll"&gt;scroll to 2&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#scroll3" rel="" id="scroll3" class="scroll"&gt;scroll to 3&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#scroll4" rel="" id="scroll4" class="scroll"&gt;scroll to 4&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="span3"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#scroll5" rel="" id="scroll5" class="scroll"&gt;scroll to 5&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;hr /&gt; &lt;/div&gt; &lt;hr /&gt; &lt;div class="row scrollable"&gt; &lt;div class="well"&gt; &lt;ul&gt; &lt;li&gt;&lt;a name="scroll1" id="scroll1to"&gt;&lt;strong&gt;1. Some text&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a name="scroll2" id="scroll2to"&gt;&lt;strong&gt;2. Some text&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a name="scroll3" id="scroll3to"&gt;&lt;strong&gt;3. Some text&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a name="scroll4" id="scroll4to"&gt;&lt;strong&gt;4. Some text&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a name="scroll5" id="scroll5to"&gt;&lt;strong&gt;5. Some text&lt;/strong&gt;&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="span3"&gt; &lt;div class="well"&gt;relative&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="footer"&gt; &lt;div class="well"&gt;footer&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Current bad CSS:</p> <pre><code>.links { width:58%; position:fixed; } .hidebehind { position: fixed; width:58%; } .scrollable { margin-top:170px; overflow:auto; } </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.
    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