Skip to main content
Solved

Vertically align text in the center


Forum|alt.badge.img+9

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

Thanks!

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • 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


Forum|alt.badge.img+9
  • Author
  • Problem Solver II
  • 98 replies
  • 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!


Forum|alt.badge.img+1
  • Contributor I
  • 1 reply
  • 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
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • 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