Okay
  Public Ticket #2748429
Aligning
Closed

Comments

  • Anna Goncalves started the conversation

    Why is that I can not align text to the right? I can align to the left and center with css but not right, any suggestions? 


    Thanks


    Ps.: example attached

  • [deleted] replied

    Hi Anna

    Thank you for reaching out to us.

    There's no way to set this up with table or column settings, so you would need to add a custom CSS class to the column you wish to change the alignment for (in column settings, add a custom class, like "totheright"), and then in the "Customize" tab above the table, you can define that class with:

    .wpDataTablesWrapper table.wpDataTable th.totheright {text-align: right !important;}

    This aligns the header. If you wish to align the data in the cells below, use this:

    .wpDataTablesWrapper table.wpDataTable td.totheright {text-align: right !important;}

    If you want to align the entire table you can use the Customize tab and add this code

    table.wpDataTable th { text-align: right !important; } table.wpDataTable td { text-align: right !important; }

    If there is anything else we can assist you with please don't hesitate to contact us.