Skip to main content
Problem Solver II
Apr 19, 2022 2:43 AM UTC
Solved

Vertically align text in the center

Hi folks, is there a snippet of code that would align some text in the center of a split block? ie:

Thanks!

    This topic has been closed for replies.
    David To
    David ToAnswer
    Klaviyo Employee
    Apr 19, 2022 7:34 PM UTC

    Hey @wernstrom,

    I’m not an email designer, but I’m sure there would be some snippet using HTML that would allow you to appropriately apply padding that would vertical align a set of text via a text block (including one in a split block). 

    My way to get around this though, would be replicating the content in a split block through a table block. One of the great things about a table block is that it offers a vertical align style setting under Block Styles. This style option is available in both the New and the Classic editor. 

    New Editor
    Classic Editor

    David

    4 replies

    David To
    Klaviyo Employee
    David ToAnswer
    Klaviyo Employee
    Apr 19, 2022 7:34 PM UTC

    Hey @wernstrom,

    I’m not an email designer, but I’m sure there would be some snippet using HTML that would allow you to appropriately apply padding that would vertical align a set of text via a text block (including one in a split block). 

    My way to get around this though, would be replicating the content in a split block through a table block. One of the great things about a table block is that it offers a vertical align style setting under Block Styles. This style option is available in both the New and the Classic editor. 

    New Editor
    Classic Editor

    David

    wernstromAuthor
    Problem Solver II
    Apr 20, 2022 5:27 AM UTC

    Thank you @David To ! I tried a few snippets I found online and couldn’t get anything to work, I must have missed that option for the tables, will give it a shot!

    Contributor I
    Nov 30, 2022 1:27 PM UTC

    @David To It is 7 months after this has been discussed but I’ve run into the same issue now. I have noticed that there is the option for vertical-align only for a Table but not for a Split. Is there any way to achieve that same alignment but on a Split? 

    David To
    Klaviyo Employee
    Klaviyo Employee
    Nov 30, 2022 8:09 PM UTC

    Hey @sonyawinner,

    At present we don’t have a native method to vertically align texts through a split block like we do through a table block. I personally assume this may have something to do with how you can create flexible columns through a split block. 

    I have seen some users find success in using custom HTML in order to vertically align texts in a split block. You may want to consult with your email designer for more details or reach out to one of our many Klaviyo Partners.

    David