• Resolved philsrgtz

    (@philsrgtz)


    Hi everybody,

    I need help with the text alignment in my customer-order-completed mail. I put the attached css in the custom css section and the preview looks good, but when the customer makes an order they will receive and email without all the changes. So it seems that it is completely ignored in the final email and does not work.

    Have anybody any ideas or a solution? Thank you!

    th.td {
    text-align: left !important;
    padding-left: 0px !important;
    padding-right: 25px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    }

    td.td{
    text-align: left !important;
    padding-left: 0px !important;
    padding-right: 25px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    }

Viewing 8 replies - 1 through 8 (of 8 total)
  • hannah

    (@hannahritner)

    Hey,
    Thanks for reaching out! Have you cleared your cache after adding this css?

    Kindly,
    Hannah

    Thread Starter philsrgtz

    (@philsrgtz)

    Hi Hannah,
    thanks for your answer. I have cleared the cache and also used another browser. But as I said it looks all right in the preview but not in the testmail or in the mail the customer gets.

    Kind regards,
    Philipp

    hannah

    (@hannahritner)

    Hi,
    I’ll check with the dev team and see if they have any insight.
    Thanks for your patience!

    Kindly,
    Hannah

    Thread Starter philsrgtz

    (@philsrgtz)

    Thanks a lot!

    Hi,
    If you are going to use custom CSS you need to make sure the selector is extremely specific because all CSS runs through a function that places it all inline in HTML and in that case !important is meaningless. CSS is added inline instead of in a stylesheet for best compatibility with email clients. This is all done by Woocommerce core and not something we add.

    Can you send me a screen shot of what you are hoping to achieve? Without knowing what settings you are using I can’t see what you are going for just by the css. then perhaps I can offer a suggestion.

    Ben

    Thread Starter philsrgtz

    (@philsrgtz)

    Hi Ben,
    thank you for your answer. I want to align the text in the table head and body on the left.

    Preview
    Preview-Upper Table
    Preview-Lower Table

    Final-Mail
    Final-Mail Upper Table
    Final-Mail Lower Table

    Kindly,
    Philipp

    So here is css you can use:

    #template_container #body_content_inner table.td th.td, #template_container #body_content_inner table.td td.td {
      text-align: left !important;
    }

    Ben

    Thread Starter philsrgtz

    (@philsrgtz)

    Thanks a lot! It works perfectly ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘text alignment doesn’t work’ is closed to new replies.