We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2340712
How to customize cell contents
Closed

Comments

  • fangquans started the conversation

    Dear support,

    I have a broad question on how to customize cell contents. This includes font size, alignment, margins, paddings, text size, image size, text color, background color of each cell or row.

    Is there any documentation?? 

  •  2,576
    Aleksandar replied

    Hello fangquans

    Unfortunately, there isn't any documentation with detailed instructions on how you can do this, but if what you're looking for isn't found in "Settings/Color and font settings", you can do it with custom CSS.

    For example, you can add a Custom CSS Class to the column, which is meant to call on a class which you would define in Custom CSS field in main settings of wpDataTables.

    So, if you were to name the class "color1", you should go to main settings/Custom JS and CSS/Cusom CSS, and enter this:

    table.wpDataTable td.color1 {
    color: red !important;
    }

    For table headers, you can find the column name in the column settings:

    6037346968.png

    Then add the following CSS:

    .wpdt-c th.column-product {
    background-color: red !important;
    }

    My test table has columns "Name", "Product", "Date" and "Image", so my CSS would look like this:

    .wpdt-c th.column-name {
    background-color: gray !important;
    }
    .wpdt-c th.column-product {
    background-color: red !important;
    }
    .wpdt-c th.column-date {
    background-color: blue !important;
    }
    .wpdt-c th.column-image {
    background-color: wheat !important;
    }

    And the outcome would be:

    9987106445.png

    If you want to apply this to all tables, you can paste the CSS in Custom CSS field in Custom JS and CSS tab in main settings of wpDataTables. If, however, you wish to apply this only to a certain table on front-end, you need to add it when you're creating the page, above the shortcode, in between the <style>...</style> tags, like this:

    <style>
    .wpdt-c th.column-name {
    background-color: gray !important;
    }
    .wpdt-c th.column-product {
    background-color: red !important;
    }
    .wpdt-c th.column-date {
    background-color: blue !important;
    }
    .wpdt-c th.column-image {
    background-color: wheat !important;
    }
    </style>
    [wpdatatable id=1]
    

    Of course, you can add "color" instead of "backgroung-color" if you wish to change the font color.

    I hope this helps.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • fangquans replied

    HI Aleksandar,

    The color setting kind of works for me. Can you give an example of aligning the text?? I use the follow css, but it doesn't seem to work

    table.wpDataTable td{
      text-align: center;
    }
  •  2,576
    Aleksandar replied

    Hi again fangquans

    You can use the same class you used for the color.

    For example:

    table.wpDataTable td.color1 {
    color: red !important;
    text-align: center !important;
    }


    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables