Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to make DIV show up on top of other Divs
    primarykey
    data
    text
    <p>I upload my code on jsFiddle, you can see it there.</p> <p><a href="http://jsfiddle.net/SrT2U/2/" rel="nofollow">http://jsfiddle.net/SrT2U/2/</a></p> <p>When you click on the link, the hidden FAQ section will show up, and it will push other divs down. But that is not what I want, I need all other divs stay where they are, and my hidden FAQ section just float on the top. Not sure how to do it. Not even sure if this should be done in HTML, CSS or jQuery.</p> <p>My jQuery code:</p> <pre><code>$(function(){ $(".OpenTopMessage").click(function () { $("#details").slideToggle("slow"); }); }); </code></pre> <p>HTML code:</p> <pre><code>&lt;div style="border: 1px solid #000;"&gt; &lt;span&gt;link&lt;/span&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;span&gt;link&lt;/span&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;span&gt;link&lt;/span&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;span&gt;link&lt;/span&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;span&gt;link&lt;/span&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;/div&gt; &lt;div id="faqBox"&gt; &lt;table width="100%"&gt; &lt;tr&gt;&lt;td&gt;&lt;a href="#" id="openFAQ" class="OpenTopMessage"&gt;this is hte faq section&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;div id="details" style="display:none"&gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt; the display style property is set to none to ensure that the element no longer affects the layout of the page &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt; &lt;/div&gt; &lt;/div&gt; &lt;br/&gt;&lt;br/&gt; &lt;div style="background:#c00;"&gt;other stuff heren the height reaches 0 after a hiding animation, the display style property is set to &lt;/div&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