Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sadly I'm not too familiar with that table library, so I just threw something together here that works on FireFox (I'm sure Kees Schepers handles the cross-browser styling better than I care to).</p> <p>Anyway, the important part is the div (<code>#d</code>) around the table (<code>#t</code>) with <code>position:relative;</code>. That allows the <code>position:absolute;</code> of the <code>:first-child</code> elements to take effect relative to the stationary <code>#d</code> instead of the scrolling <code>#t</code>.</p> <p>Sample HTML:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; #d { /*** Important part is here ***/ position:relative; } #t { display:block; overflow-x:scroll; overflow-y:visible; width:412px; } #t tbody { display:block; margin-left:202px; } #t th, #t td { border:1px solid #000; } #t tr th:first-child, #t tr td:first-child { background:#FFF; left:0; position:absolute; width:200px; } #t tr td div { height:200px; width:200px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="d"&gt; &lt;table id="t" cell-padding="0" cell-spacing="0"&gt; &lt;tr&gt; &lt;th&gt;head1&lt;/th&gt; &lt;th&gt;head2&lt;/th&gt; &lt;th&gt;head3&lt;/th&gt; &lt;th&gt;head4&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div&gt;###&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Hope that helps some.</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.
    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