Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy part of an 'absolute' positioned DIV element in a table cell is not shown (in Google Chrome only)
    primarykey
    data
    text
    <p>To demonstrate this issue, below HTML file displays a very tall DIV (named div1), which is initial hidden, and a button to show or hide div1. Open it in Google Chrome, then click on the button to show the div. You will notice that the div is now displayed, but there is no way to see its lower part because it is too tall to fit in the window and Chrome does not display a scroll bar. </p> <p>If you open it in Firefox, there is no such issue. Firefox displays a scroll bar when the div1 is shown so that you can scroll to see its lower part.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="http://api.prototypejs.org/javascripts/pdoc/prototype.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="button" onclick="$('div1').toggle();" value='Toggle'&gt;&lt;/input&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;div style="position:relative"&gt; &lt;div style="position:absolute"&gt; &lt;div id='div1' style="position:absolute; height:1500px; width: 200px; border: 1px solid gray; display:none"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I found this had something to do with the table element and the first div. If I either remove the table/tr/td tags or change the style of the first div from "position: relative" to "position:absolute", Google Chrome will display the scroll bar properly. Unfortunately, in my project, I could not do this as it would affect a lot of elements in the page.</p> <p>It looks like a bug in Chrome? Are there any other workarounds/fixes?</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.
 

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