• Resolved brigerard

    (@brigerard)


    Hello Tobias,
    When I use DataTables JavaScript with a table, css code to center the table does not work.

    Regards Gerard

    Here is my css code:

    .tablepress {
    margin-left: auto! important;
    margin-right: auto! important;
    width: 600px! important;
    }
    
    .tablepress th {
    font-family: Calibri;
    font-size: 14px;
    color: # 282828;
    background-color: # 787878;
    text-align: center;
    }
    
    .tablepress td {
    font-family: Calibri;
    font-size: 14px;
    text-align: center;
    color: # 282828;
    background-color: # D0D0D0;
    }
    
    .tablepress. {t even
    background-color: # F0F0F0;
    }
    
    .tablepress. odd td {
    background-color: # D0D0D0;
    }
    
    .tablepress. hover row-tr: hover td {
    background-color: # FFFF00! important;
    }
    
    .tablepress. {sorting
    background-color: # 787878;
    }

    http://ww.wp.xz.cn/extend/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Gerard,

    please post a link to the page with the table that is not working. I’ll gladly take a look! (Just the CSS code is not enough for this unfortunately.)

    Thanks!
    Tobias

    Thread Starter brigerard

    (@brigerard)

    Hello Tobias,
    I can not give a link, the test locally on my pc with WebMatrix.
    Looking at the css internet explorer, if I disable. Datatables_wrapper. Tablepress, centering works.
    the specific css that I entered is overwritten by that of
    . datatables_wrapper. tablepresslink to image: http://dl.dropbox.com/u/35036317/Capture.JPG

    cordially
    Gerard

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Gerard,

    ah, ok. The local test is a bit unfortunate here, but I think we can fix it:
    Please replace your “Custom CSS” completely with this new one (in which I added pieces to make the .dataTables_wrapper class centered, and also fixed some syntax errors):

    .tablepress,
    .dataTables_wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 600px;
    }
    
    .tablepress th {
    font-family: Calibri;
    font-size: 14px;
    color: #282828;
    background-color: #787878;
    text-align: center;
    }
    
    .tablepress td {
    font-family: Calibri;
    font-size: 14px;
    text-align: center;
    color: #282828;
    background-color: #D0D0D0;
    }
    
    .tablepress .even td {
    background-color: #F0F0F0;
    }
    
    .tablepress .odd td {
    background-color: #D0D0D0;
    }
    
    .tablepress .row-hover tr:hover td {
    background-color: #FFFF00 !important;
    }

    Regards,
    Tobias

    Thread Starter brigerard

    (@brigerard)

    it’s ok
    Thanks!
    Gerard

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    great! Thanks for confirmation. Good to hear that this worked!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘css and DataTables JavaScript’ is closed to new replies.