I have a text that is connected to a data in a collection. I want the text to remain vertically centered within the element that contains it. It doesn’t matter if I have to use a textbox, a button, etc.
It should be a very simple task, but I have searched and tried several different ways, but I have not been able to do it, neither in Wix nor in Corvid. How can I do that?
@cotijaparroquia If it’s attached to a box or strip, all you have to do is select the center align icon in your Tools Toolbar. It’s right under the trash can icon.
I didn’t misunderstand your question, however for your purposes you are much better suited going with David’s good response and using the horizontal and vertical alignment tools from within the Wix Editor for the text box that is attached to a box for example.
@givemeawhisky Hey guys, I was reading these topics and the links indicated: I think I understand what he is talking about because its basically my question at the momment. I have a textbox linked to a dataset, and I need the text inside the text box to be in its center vertically. Not the box aligning with the strip, but the text inside the textbox to occupy the 2d center of the textbox… like in the image #1 (sorry for my mouse sh*ty caligraph, I have trembling anxieties while posting my doubts :D)
Otherwise, when the text in the dataset is longer than the box, it expands down, like in image2
note: tested all forms of aligning the itens in that group, and even ungrouping, but the result is the same, the text expands down.
@lucassmdesign Keep in mind, text elements will always respect the top positioning, and only expand to the bottom. So you can make your text’s dimensions larger height-wise in the editor to give you a better idea of where you should position it. You can also try setting your text’s html property in order to have it as one single text element instead of two.
Hi @GOS I believe he means if you have a large text box, how do you align the text to be vertically centred…not the text box itself but the text inside the text box.
Since the Wix editor generally uses a more fixed structure for element positioning, it’s not possible to align text vertically in this way.
I’d recommend using Wix Studio which allows you to dock elements to their parent elements in various ways, and allows for a responsive layout that supports this.
For example, aligning it’s positing to the center, so as the height of the text changes, it remains centered: