Skip to main content
Problem Solver II
April 19, 2022
Solved

Vertically align text in the center

  • April 19, 2022
  • 4 replies
  • 4027 views

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.
    Best answer by David To

    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
    April 19, 2022

    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
    April 20, 2022

    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
    November 30, 2022

    @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
    November 30, 2022

    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