how to center table on page

how to center table on page

64coach64coach Posts: 15Questions: 0Answers: 0
edited December 2012 in DataTables 1.9
How can i center my table on the page. Looked through the CSS and html and couldnt find where to change or add.

Thanks,

Coach
http://www.newjerseysepticservice.com/table/gmjr-full.html

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Your table is too wide for the container element so it is overflowing. You either need to make the table smaller or the container bigger. i'd suggest the later.

    Allan
  • 64coach64coach Posts: 15Questions: 0Answers: 0
    Allen,
    Thank you for your reply. Where would i go to increase the container. Would this also center the table on the page. I'm new to this, i like to learn the in's and out's on basic adjustments.

    Also, what do you mean by "it's overflowing"

    Thank you for your patience,
    64Coach
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Try poking around the page with Firebug or Inspector and you'll see what I mean.

    The CSS you are having a problem with is in `demo_page.css` line 15:

    [code]
    #dt_example #container {
    width: 875px;
    ...
    [/code]

    Personally I wouldn't use the DataTables demo page example stylesheet for anything other than a DataTables examples page - but it's up to you :-)

    Allan
  • 64coach64coach Posts: 15Questions: 0Answers: 0
    edited December 2012
    Allen,
    If i pay for support can someone put a table together for me. How can i contact you with questions other than the forum.

    I see what you mean now about the overflow (I removed the demo.page.css on my test page).

    Also,If possible can you point me where i would adjust for "show entries, search all columns, showing entries x to xx and the previous / next buttons. When i removed the demo.page.css and adjusted the table these areas stayed all the way to the right and left. I'm not sure where to look for them or even what there called. Any help would be appreciated.

    Thanks
    64Coach
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Support for for how to solve specific problems rather than developing a site / table from the ground up. That would be a contract job, and I'm currently fully booked in that regard.

    You probably want to include jquery.dataTables.css since that has slating information for the DataTables elements. You might also want to take a look at this blog post which details how a table can be styled: http://datatables.net/blog/Creating_beautiful_and_functional_tables_with_DataTables

    Allan
  • 64coach64coach Posts: 15Questions: 0Answers: 0
    Allen,
    How difficult is it to combine "individual column filtering (using select menus) and hidden row details". Can these's two be combined?

    Thanks,

    64Coach
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Should be perfectly possible. What issue are you having when you try it?

    Allan
  • 64coach64coach Posts: 15Questions: 0Answers: 0
    I'm a newbe at this, not sure how to combine the code and not show error messages. Do you have any Tutorials that show how to do something like this?

    Thanks,

    64Coach
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Not for that specific case I'm afraid. What did you try?
  • 64coach64coach Posts: 15Questions: 0Answers: 0
    Allan,
    Being a newbe i just tried merging the two together the best i could from looking at other examples. It work to an extent but errors were displayed and images were placed in different places.

    I'm going to try again this weekend...hopefully with better results.

    Regards,

    64Coach
This discussion has been closed.