Centering The Zero DOM Table?
Centering The Zero DOM Table?
I copied and sent the following files to my server...
js filee
demo_page.css
demo_table.css
jquery.dataTables.js
dataTables.js
The table is loading, but its not centered like shown on the Zero configuration site:
http://datatables.net/release-datatables/examples/basic_init/zero_config.html
My table is also as wide as the screen.
How do I center the table and reduce the width of the columns?
Thanks!
js filee
demo_page.css
demo_table.css
jquery.dataTables.js
dataTables.js
The table is loading, but its not centered like shown on the Zero configuration site:
http://datatables.net/release-datatables/examples/basic_init/zero_config.html
My table is also as wide as the screen.
How do I center the table and reduce the width of the columns?
Thanks!
This discussion has been closed.
Replies
#container is constrained to "800px"
#container has left and right margin set to "auto", which centers it
see http://datatables.net/release-datatables/media/css/demo_page.css
[code]
#dt_example #container {
width: 800px;
margin: 30px auto;
padding: 0;
}
[/code]
put your table code inside a div named #container and apply the css. you can take the above and remove #dt_example if you wish
[code]
...
[/code]