• Resolved quarlton

    (@quarlton)


    I’m trying to right align a set of numbers
    On the page linked above, is a table at top right. ‘Family Tree Statistics’
    I want to right align the values but can’t manage to do it.

    Any help would be welcome.

    Many thanks

    Dave

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Dave,

    Thank you for reaching out. Is this a publication or a project?

    Class wpda_format_number is added to number fields in publications. You can generally align these values with global CSS or use the Code Manager to add CSS to individual publications using selector td.wpda_format_number.

    Class wpda_data_type_number is add to numeric fields in projects execute on the back-end or on the front-end using shortcode wpdadiehard. Please use selector input.wpda_data_type_number.

    With Data Forms you can use selector input[type=number].

    Does this answer your question?

    Thanks,
    Peter

    Thread Starter quarlton

    (@quarlton)

    Hi Peter

    Many thanks for your reply.
    It is a publication that I am trying to format.
    Inspecting the values they show up as:
    td.table1_total.wpda_format_string

    I tried using the following in Additional CSS but it didn’t work:
    td.dwpda_format_string{text-align:right;}

    Any further suggestions would be welcome

    Thank You
    Dave

    Plugin Contributor Kim L

    (@kimmyx)

    Hi Dave,

    You can try to use the nth-child pseudo selector to target that specific column. For example:

    #tng_statsview3 td:nth-child(2) { text-align: end; }

    Let us know if this works!

    Thread Starter quarlton

    (@quarlton)

    Hi Kim,

    That works perfectly.

    Many thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Align Numbers Right’ is closed to new replies.