Note that there are some explanatory texts on larger screens.

plurals
  1. PODatatables - Column Headers don't move when scrolling horizontally
    primarykey
    data
    text
    <p>I have a simple example of my problem. I am using Datatables 1.9. The column headers don't move when scrolling horizontally when the datatable is inside another html table. It works fine when it is not in the html table. My example was actually taken from their example on horizontal scrolling but I added the outer table. Any help would be appreciated. I have looked everywhere for the answer. Here is the code. Thanks</p> <pre><code>&lt;head&gt; &lt;script type="text/javascript" src="&lt;%=request.getContextPath()%&gt;/scripts/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;%=request.getContextPath()%&gt;/scripts/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;%=request.getContextPath()%&gt;/scripts/jquery.dataTables.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;form&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;div id="demo"&gt; &lt;table id="example"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Rendering engine&lt;/th&gt; &lt;th&gt;Browser&lt;/th&gt; &lt;th&gt;Platform(s)&lt;/th&gt; &lt;th&gt;Engine version&lt;/th&gt; &lt;th&gt;CSS grade&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tfoot&gt; &lt;tr&gt; &lt;th&gt;Rendering engine&lt;/th&gt; &lt;th&gt;Browser&lt;/th&gt; &lt;th&gt;Platform(s)&lt;/th&gt; &lt;th&gt;Engine version&lt;/th&gt; &lt;th&gt;CSS grade&lt;/th&gt; &lt;/tr&gt; &lt;/tfoot&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Trident&lt;/td&gt; &lt;td&gt;Internet Explorer 4.0&lt;/td&gt; &lt;td&gt;Win 95+&lt;/td&gt; &lt;td&gt;4&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Other browsers&lt;/td&gt; &lt;td&gt;All others&lt;/td&gt; &lt;td&gt;-&lt;/td&gt; &lt;td&gt;-&lt;/td&gt; &lt;td&gt;U&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"&gt; $(document).ready(function() { $('#example').dataTable( { "sScrollX": "100%", "sScrollXInner": "110%" } ); } ); &lt;/SCRIPT&gt; </code></pre>
    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