Okay
  Public Ticket #2797284
How to change header size of tables?
Closed

Comments

  • Nicholas Tan started the conversation

    We want to be able to modify the size/style of the header text of a table, but only on specific pages, rather than for all instances of the table.

    ie. We have a table A, we want it to appear one page X with a 'h2'-styled header (which I believe is the default), but on page Y with a 'h5'-styled header.

  • [deleted] replied

    Hi Nicholas

    Thank you for reaching out to us.

    Unfortunately, this can't be changed with the plugin's built-in features.

    You can change it with some custom CSS, though:

    table.wpDataTableID-250 th {
    font-size: 50px !important;
    }

    Just change the size from 50px to some other value and the table ID to the corresponding table ID and place it in the Customize tab in the table settings.

    6650394140.png


    I hope this helps, do let us know if you need any further assistance. 


  • Nicholas Tan replied

    Hi Blazenka,

    I tried adding it, but it doesn't seem to have made any changes.

    http://www.mdxpl.com/bg/

    8157858370.png

    We used 2px just as an extreme example to see if it would change anything, but we also tried with 17px.

    Also, we would like to be able to set it per page, rather than per table. Can we do that by just adding CSS in a code block on the page or something like that?

  • [deleted] replied

    Hi Nicholas

    You can try this

    table.wpDataTable th {
    font-size: 50px !important;
    }


    This will be affected on all tables, but if you want it just for specific ones then insert this code on the page where those tables are between the style tags.(<style>Code here</style>)

    <style>
    table.wpDataTable th {
    font-size: 50px !important;
    }
    </style>

    Do let me know if this helps.

  • Nicholas Tan replied

    Hi Blazenka,

    I tried adding a code block and putting that CSS code in there with the style tags, but did not change anything. Is that the right way to do it?r

  • [deleted] replied

    HI Nicholas

    Could you please provide us with a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.




  •   Nicholas Tan replied privately
  • [deleted] replied

    Thank you. I created a test table and applied the CSS code I previously sent you, and as you can see on the images below it works as expected.

    9661783262.png
    1152480518.png

    I can also see on your table ID 652 you have the same CSS code added and the header text size is reduced accordingly.

    1748680170.png

    I may be missing something here, could you please explain once again what is the issue you are experiencing?

  • Nicholas Tan replied

    Apologies, I chose the wrong word to use. What I meant was the name of the table.

    For example, on http://www.mdxpl.com/bg/, I want to reduce the size of the text

    "BG | Ball & Roller Bearings 10602"

    and

    "PS | Prefix & Suffix 10606"

  • [deleted] replied

    Hi Nicholas

    For the table name you can use a CSS code like this

    h2#wdt-table-title-652.wpdt-c {
    font-size: 7px !important;
    }
    

    just replace the ID number with the corresponding table.

    5238286988.png


    Do let me know if this helpssmile.png 

  • Nicholas Tan replied

    It worked, thank you Blazenka!

  • [deleted] replied

    You are most welcomesmile.png

    If there is anything else we can assist you with please don't hesitate to open a new ticket, we will gladly help.

    Have a wonderful day!