• Resolved danniee

    (@danniee)


    Hi!

    Been trying to solve this on and off for a few days but couldn’t.

    I’m trying to left align text but also center position it in the column, if that makes sense. I was looking at the justify property but couldn’t make it work.

    Thank you

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.

    Is this in the same cells? If so, the best approach should be to make left-align the default (which it normally is), and then use HTML like

    <center>This is centered.</center>
    

    for the centered text.

    Regards,
    Tobias

    Thread Starter danniee

    (@danniee)

    Hi @tobiasbg and thank you for your kind help.

    This centers the content but it also centers the text. I wish to center the content but have it show like a list/left aligned. Not sure if you know what I mean ??

    And yes, it’s in the same cell.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no, I don’t really understand what you mean ?? This HTML tag will center everything that is inside it. What (in the link that you sent be email) do you want this to apply to?

    Regards,
    Tobias

    Thread Starter danniee

    (@danniee)

    Hi @tobiasbg

    Sorry, I’m not explaining well.

    This is what I am trying to achieve. Content aligned center but text aligned left: https://imgur.com/b3Q1viI

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    then you are actually trying to increase the left padding of the cell, with something like

    .tablepress-id-123 .column-3 {
      padding-left: 50px;
    }

    if you want to to apply it to a full column.

    Regards,
    Tobias

    Thread Starter danniee

    (@danniee)

    Hi @tobiasbg

    Hm, with this solution, the text will move relative to the window size. I’ll just drop this idea for now. Don’t want to waste more of your time.

    Thank you Tobias

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    another way would be to add an extra HTML element around that text (e.g. a <div>) with a fixed width. Then, you could make that element centered but have the text in it left aligned.

    Regards,
    Tobias

    Thread Starter danniee

    (@danniee)

    @tobiasbg thank you, will try.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ??

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Align text left but position center’ is closed to new replies.