Support » Plugin: TablePress » CSS: Adjust text alignment of one specific column

  • Resolved Marcus

    (@lotuz)


    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/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    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

    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.”

    Plugin Author TobiasBg

    (@tobiasbg)

    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

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

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

    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?

    No worry, … now I get it. Sorry for misinterpret your total clear answer 😉

    Thanks for helping anyway!

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

    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

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    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

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    Thank you Tobias!

    Please advice how do I do the update – can’t seem to find a button in my WordPress Menu…

    Thanks!

    Daria

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    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!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘CSS: Adjust text alignment of one specific column’ is closed to new replies.