• Resolved wordmatej

    (@wordmatej)


    Hi, I am doing some test research about tablepress, because most likely it will be my default table browser and I would like to have a table that has text alignment from both sides – from left and right. I tried lower CSS and did not work:

    tablepress tbody td {
    text-align: justify !important;
    }

    Any solution?
    Regards & Merry Christmas

    • This topic was modified 11 months ago by wordmatej.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter wordmatej

    (@wordmatej)

    2nd thing:
    Also, if you can check on the same page, where tables are placed in:
    – accordion (I think here lines are ok)
    – dropdown blue button (for season results),
    here s I have a small issue about header width – columns in header are not in same line (width) as columns in body, therefore text in header is not ligned with text in body. To solve this, I tried ti put CSS on head but not working:

    /*TABLEPRESS – Header*/
    .dataTables_scrollHeadInner {
    width: 100% !important;
    }

    /*TABLEPRESS – Header*/
    table.dataTable thead th {
    background-color: #003260 !important;
    font-size: 19px !important;
    color: white;
    font-weight: 400 !important;
    line-height: 22px !important;
    padding-left: 10px !important;
    }

    Any solution?

    Best regards

    • This reply was modified 11 months ago by wordmatej.
    • This reply was modified 11 months ago by wordmatej.
    • This reply was modified 11 months ago by wordmatej.
    Thread Starter wordmatej

    (@wordmatej)

    overlooked:

    in accordion “Lestvica ekipno” you can see on Desktop that lines are not ok.
    Any solution?

    Regards

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    The text-align: justify CSS should work fine here. But not that it will only really take effect if the cell content wraps in two or more lines. For short cells, this will behave just like text-align: left.

    As for the accordion and dropdowns: This is indeed a known issue, due to the horizontal scrolling. In short: When using accordions, the tables will initially be hidden. This means that the JavaScript code can not make certain calculations, for example regarding the column widths, as invisible elements don’t have a width. This leads to this mismatch.

    In your case, the best solution would be to use a different type of horizontal scrolling, which does not rely on JavaScript code. This is however only available as part of the Responsive Tables feature module that is part of the TablePress premium license plans.
    Alternatively, this will be fixed after turning off the “Horizontal Scrolling” checkbox (or then actually the “Enable visitor features” checkbox, as you don’t seem to be using the other features).

    Best wishes,
    Tobias

    Thread Starter wordmatej

    (@wordmatej)

    Thanks for nice reply.
    I will have to think about it and let you know if I will have any question(s).

    Happy 2024.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem! If there’s anything else, just let me know!

    All the best for 2024 as well!
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Align text from left and right’ is closed to new replies.