Note that there are some explanatory texts on larger screens.

plurals
  1. POAbsolutely Positioned Element Disappears in IE
    primarykey
    data
    text
    <p>I have an ASP.NET page that has an absolutely positioned span which acts as a button for hiding a div. It works fine in Firefox, Chrome, and Safari but it disappears in IE. I copied the same HTML structure and CSS to a text editor using normal HTML (not web forms) and it doesn't disappear.</p> <p>Here's the HTML:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Instructions&lt;/title&gt; &lt;style type="text/css"&gt; * { margin:0; outline:0; padding:0 } body { font:normal 12px/1.4 Sans-Serif } #wrapper { margin:0 auto; width:940px } .instructions-container { overflow:hidden; position:relative } .instructions { border:3px solid #eee; margin:10px 0 0; padding:7px; position:relative } .hide-instructions { background:url(../images/icon/cancel.png) no-repeat scroll 0 0 red; cursor:pointer; display:block; height:16px; position:absolute; right:7px; top:7px; width:16px; zoom:1 } .show-instructions { background:#eee; display:none; color:#666; float:right; padding:10px; text-decoration:none } .show-instructions:hover { background:#ccc } &lt;/style&gt; &lt;script src="http://code.jquery.com/jquery-1.8.0.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function () { InitializeInstructions(); }); function InitializeInstructions() { var instructions = $('.instructions'), hide = $('.hide-instructions'), show = $('.show-instructions'); instructions.hide(); show.show(); hide.click(function () { instructions.slideUp('slow'); show.slideDown('fast'); }); show.click(function () { instructions.slideDown('slow'); show.slideUp('fast'); }); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div class="instructions-container"&gt; &lt;div class="instructions"&gt; &lt;h2&gt; Instructions &lt;/h2&gt; &lt;p&gt; Nulla vehicula volutpat nibh at semper. Praesent sem odio, dignissim eget scelerisque ut, ornare in enim. Fusce pellentesque rhoncus egestas. Vestibulum lobortis nunc ligula, a elementum ligula. Pellentesque luctus convallis sagittis. Nunc ut justo vitae elit luctus cursus a sed odio. Nam nec consectetur neque. &lt;/p&gt; &lt;span class="hide-instructions"&gt;&lt;/span&gt; &lt;/div&gt; &lt;a class="show-instructions" href="#"&gt; Show Instructions &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When you click on <strong>a.show-instructions</strong>, the div.instructions appears along with <strong>span.hide-instructions</strong>. Thing is, it disappears after the div has finished sliding.</p> <p>I really don't understand why <strong>span.hide-instructions</strong> disappears when it's in an aspx page; the code is the same. Help would be greatly appreciated.</p> <p>Thank you!</p> <p><strong>UPDATE: The span reappears when you try to highlight text and hover over the blue thingy in IE8</strong></p>
    singulars
    1. This table or related slice is empty.
    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