• Resolved remmo

    (@remmo)


    Hi,

    in the preview in TablePress the table is displayed differently than in the post. Can something be done about it? I need the same look in the post as well. I added my own CSS style in TablePress.

    Thank you.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This can happen if the theme also applies CSS code that affects tables.
    In your case, it could also be other table plugins, like the WP Responsive Table plugin that seems to be active.

    Can you maybe clarify what exact styling is not being applied in the post, but in the preview?

    Regards,
    Tobias

    Thread Starter remmo

    (@remmo)

    Hi Tobias,

    thank you for quick response.

    I checked it. You’re right, the WP Responsive Table plugin is causing the problem.
    But can be CSS styles for TablePress prioritized? Styling which is not being applied in the post:

    – border
    – text-align
    – uniform row color (I don’t want alternating rows color, I don’t have this function selected in the settings)

    Situation when CSS styling for TablePress is fine:
    Why doesn’t it border the first row of the table from the top (when the table header is off)?

    Pavol

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the clarification!

    Yes, we can give the TablePress CSS a higher priority. As that other plugin is already being quite “aggressive” with its CSS, this should do it:

    #tablepress-61 tbody td {
        border: 1px solid #FF6900 !important;
        vertical-align: middle !important;
        text-align: left !important;
    }

    (Note the added !important flags and the HTML-ID-based selector.)

    As for the border on top of the first row when the header is off: I chose that deliberately, as the border is then not needed in most cases.

    Regards,
    Tobias

    Thread Starter remmo

    (@remmo)

    Hi,

    it works:) But what about uniform row color? I mentioned it in previous message.

    And it’s possible with CSS styling to give the border on top of the first row when the header is off? If yes, how?

    Greetings
    Pavol

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, sorry, forgot about the uniform background color. To override that, please use

    #tablepress-61 tr {
        background-color: #ffffff !important;
    }

    As for the top border: The CSS from above should also achieve that. Or am I missing something?

    Regards,
    Tobias

    Thread Starter remmo

    (@remmo)

    Hi,

    this CSS is working in #tablepress-61 tbody td too. What’s the difference from #tablepress-61 tr?

    As for the top border: Sorry, you’re right.

    Pavol

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    with the tbody td version you are setting a background color for the cells (which are “above” the background color of the rows). The tr version is setting the background color of the rows, which are then “shining through” to the cells.
    The result will be the same, it’s just a technical difference.

    Regards,
    Tobias

    Thread Starter remmo

    (@remmo)

    Hi, Tobias,

    THANKS for the clarification and help. Everything works as I need.

    May you be successful.

    Pavol

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias
     
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Different appearance in preview vs. post’ is closed to new replies.