WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] CSS: Adjust text alignment of one specific column (19 posts)

  1. Marcus
    Member
    Posted 1 year ago #

    Hey Tobias,

    another question from my side. I want to adjust the text-align of one column. Is there any way to do it easily?

    In my case, the last column is the price information. Since I split the tables to use them in other specific articles, it looks weird, that the tables have the same width, but the prices are not in one line under each other in each table.

    So I thought about align the prices, in my case the last column, every time to the right. That should fix my problem.

    Can I add specific CSS to one column? Is there any other way?

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    sure, that's easily possible with some "Custom CSS" like this:

    .tablepress-id-123 .column-4 {
      text-align: right;
    }

    Just adjust the table ID and the column number as necessary.

    Regards,
    Tobias

  3. Marcus
    Member
    Posted 1 year ago #

    That is exactly what I did.

    But when I pass the string .tablepress-id-3 .column-2 {text-align: right; }, I just get the error: "The entered value in the field “Extra CSS classes” is invalid."

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    that's because you are entering this code into the wrong field. It has to go into the "Custom CSS" textarea on the "Plugin Options" screen.

    Regards,
    Tobias

  5. Marcus
    Member
    Posted 1 year ago #

    By the way, the error come when you use a dot in the beginning.

    Without that dot, the whole string is saved without :;{}.

  6. Marcus
    Member
    Posted 1 year ago #

    Okay,

    so to make a special design for a column of one specific table, I have to introduce another class, and put a CSS description in CSS Custom Styling?

  7. Marcus
    Member
    Posted 1 year ago #

    No worry, ... now I get it. Sorry for misinterpret your total clear answer ;)

    Thanks for helping anyway!

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    no :-) The "Extra CSS class" is just a feature that can make it easier to write the CSS code for a group of tables that are styled in the same way.
    In your case it is really enough, to paste the code I posted above into the "Custom CSS" textarea on the "Plugin Options" screen of TablePress. The "Extra CSS classes" field does not have to be changed in your case.

    Regards,
    Tobias

  9. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ah, ok, just saw your latest reply. Good to hear that it works now! :-)

    Best wishes,
    Tobias

  10. Daria Offin
    Member
    Posted 11 months ago #

    Hello Tobias,
    I have added the CSS code you have above for the same problem, but it does not seem to have any result.

    In face, any alignment I try to do for the last column has no effect! I have included the <div align="center"> in both columns of my table, and first one is perfect, second one - totally unaffected!

    Please advice how can I solve the problem?

    Thank you
    Daria

  11. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Daria,

    thanks for your post, and sorry for the trouble.

    Could you please post a link to the page with the table where this is not working, so that I can take a direct look? Thanks!

    Regards,
    Tobias

  12. Daria Offin
    Member
    Posted 11 months ago #

    Thank you Tobias,
    This is the page: http://www.losaltabacales.com/contact-location/
    Please let me know if you need any more info.

    Thank you
    Daria

  13. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    thanks for the link!

    This is caused by a small CSS problem caused by your theme.
    I have added a work around for this to TablePress 1.1, which was just released. So, just update to TablePress 1.1 and the alignment should work fine.

    Regards,
    Tobias

  14. Daria Offin
    Member
    Posted 11 months ago #

    Thank you Tobias!

    Please advice how do I do the update - can't seem to find a button in my WordPress Menu...

    Thanks!

    Daria

  15. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Daria,

    that's because I had to temporarily withdraw the update. Please check again now. You should see an available update to TablePress 1.1.1 within the next hours (the WordPress servers might need some time to refresh).

    Regards,
    Tobias

  16. Daria Offin
    Member
    Posted 11 months ago #

    I now see it Tobias, thanks! Sorry, this is probably a very silly answer - do I download the new version and re-install it on my WP dashboard? As I don't see an update button on the WP...

    Will my data disappear?

    Sorry to trouble you again!

    Thanks!

  17. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    no, the data will be kept, don't worry.

    Now, it's strange that you don't see an update button... Are you logged-in as an Administrator? Do other automatic updates (for plugins, themes or WordPress itself) work on your site?
    If not, you'll just have to download the new version and replace the "/wp-content/plugins/tablepress" folder on your server (via FTP) with the one from the extracted ZIP file.

    Regards,
    Tobias

  18. Daria Offin
    Member
    Posted 11 months ago #

    Thank you Tobias!

    Sorted it out and now it looks perfect!

    Thanks!

    Daria

  19. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    very nice! :-) Good to hear that you were able to fix the issue!

    Best wishes,
    Tobias

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic