Okay
  Public Ticket #3365912
Left, Right padding in cells
Closed

Comments

  • Richard Ludbrook started the conversation

    Hi there, could you please share some CSS that I could use to adjust the left, right padding in the Tables? I have an issue with very large Header titles and my client does not want to have horizontal scrolling. I understand that stacked column Headers are simply not an option? 

    Thank you!


  •  1,708
    Miloš replied


    Hi, Richard.

    1. In regards to CSS for adjusting the padding in the Table cells, you can use this CSS selector :

    .wpDataTablesWrapper table.wpDataTable td {
        padding: 17px 20px;
        padding-top: 17px;
        padding-right: 20px;
        padding-bottom: 17px;
        padding-left: 20px;
    }

    If you want this just for one table, use this CSS style in this table settings/Customize/Custom CSS,

    or if you want same style in all tables, paste it in main plugin settings/Custom JS and CSS/Custom CSS.

    -

    If you need padding for Header cells :

    .wpdt-c .wpDataTablesWrapper table.wpDataTable > thead > tr > th {
        padding: 14px 49px !important;
        padding-top: 14px !important;
        padding-right: 54px !important;
        padding-bottom: 14px !important;
        padding-left: 54px !important;
    }


    2. In regards to large Header names, let me know if you need any additional assistance, if you can elaborate and show me some screenshots,  what might be the desired goal for the use-case, and we can advise if there are workarounds?

    You can change the width of the columns, font size, etc, but not sure what is the desired goal/look.

    -

    For example, if you have many columns in a table and wish to initially hide some columns to make the table look nicer,  

    you can try our Master Details add-on,  which can provide a  "more Details" View, on a row click, or on a button click,   to show more columns for each row.

    You can check out more about this here.

    And you can test all Add-on features from Master Details on this sandbox site.


    3. That is correct, at the moment it is not possible in any way to have multi layer Headers or stacked Headers with our plugin.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Kind Regards, 

    Miloš Jovanović
    [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