-
-
I need help to vertically center some theme components within a row, I have created a row, within that row I have made two columns. The Left side I have a Gallery, the right side a I have a video, see…
https://s22.postimg.org/yufyiwwz5/Screenshot_2016_11_28_11_27_14.png
I’ve tried to vertically center by editing the column settings in Visual Composer, ‘centered content vertical’, but the video jumps up the page. I have sent a screenshot to show the problem I am having.
https://s18.postimg.org/gjteubd8p/Screenshot_2016_11_28_12_48_07.png
The red background indicates the row.
How am i supposed to vertically center components in a row / column?
Thanks Jamie
-
Hello,
The video looks like it jumps, because you should add the padding to the column.
See this screenshot.
Let us know.Best regards!
-
Hello,
You can change the padding of the column in Columns Settings. See screenshot.
Let us know.Best regards!
-
Thank you for your reply, however, I’m not too happy about setting padding or margins on pixels, because for example the left column can have a range of images of various heights, so I want the 2nd column to become vertically centered based on the row height itself.
Is there no CSS rule to apply to the column to satisfy this?
Is there something more relative, rather than pixel margins/heights?
Thanks for your speedy replies!
Jamie -
Hello,
Can you please be more clear?
Setting a columns padding/margin already makes it very relative. This way the second column is independent from the first column and the row it self. You can add what ever elements you want to each column and set up the paddings to position it’s content at the center.Let us know.
Best regards!
-
Many thanks Mihaila,
It looks like Kris replied before you, but I didn’t see the initial reply – he used a percentage padding in the component, rather than a pixel based margin on the column.
I prefer the idea of a percentage (yet to try).
What I was trying to determine is that if I had two columns, and column A had two images in a carousel causing it to resize the height, then the containing row would increase in height too and I wanted the contents of column B to be vertically centered at all times.
I found that the carousel would align to the top whilst the video appeared to align to the bottom (https://s22.postimg.org/yufyiwwz5/Screenshot_2016_11_28_11_27_14.png), I expected that choosing the ‘vertically centre’ option to put the video centered in the containing row but it jumped up outside (https://s18.postimg.org/gjteubd8p/Screenshot_2016_11_28_12_48_07.png)
Am I supposed to be adding a padding % until it looks right? I was expecting to simply tick ‘vertically centered’ and for it to then appear in the centre of the column.
-
Hello,
The carousel is not only composed from images. It has other elements (like example the navigation). So when the row centering settings are applied, it will consider these other layers as well. Not just the image. Resulting to a different alignment, then the one you expect.
This is why there are additional options, like the column padding, to give you the possibility to achieve every layout you want.Best regards!
-
You must be logged in to reply to this topic.