I have a text and image that I want to align horizontally centred.
When I do this, 1 line of text is fine. But when there are 2 lines of text, the container element is stretched.
I’ve tried placing the text input element and image in a container but text doesn’t automatically centre vertically as the lines increase to 2 lines.
I’ve also tried to group the image and text input elements together.
The compromise I was able to accept was to increase the height of the text image to the same height as the image while there is misalignment with 1 line of text
I have looked at other posts for reference:
I have a repeater with a text heading that may contain 1 or 2 lines with a coloured background box. Is there a way to vertically align the text INSIDE the text box to be centred? This way the text is always centered in the coloured background box?
I’m not entirely sure why the box doesn’t change size as the text increases which would also work.
Bottom image is how I have it currently so it at least fits the text in.
Ideally I’d like it to be like the top left with the top right aligning verti…
The containers of a repeater change their size to smaller bozes according to the data they get in. Is there a way to make the template container big enough for all data and just block that size adaption, so all of them appear aligned?
Thank you in advance.
[image]
I have linked my repeater to my dataset using $w(‘#repeater’).data. The logo of the agent for each listed item is populated based on the dataset image field however, given that the logos are different heights, this is shifting the other elements down the repeater and causing the heights to differ which doesn’t look great. I am using the “fixedWidth” fit mode.
I am trying to prevent the different logo size from affecting the position of the other text.
[image]
The elements have no vertical o…
Question - is there a way to automatically centre the text as the number of text lines increases?
1 Like
You work on Wix-Studio?
Should there be an option → called → ‘maxWidth’ where you can set the maximum WIDTH (the same for HIGHT) of a CONTAINER?
Let’s say you pull all your elements into a specific CONTAINER and give this container a fixed max. hight and width → would this work ?
Try it out.
No, just Wix Classic editor, will give Wix Studio a shot if editor doesn’t have that option
On the ordinary Wix-Editor you do not have that much possibilities, but there are maybe quite different WORKAROUNDS.
Maybe this post can help you out…
#Repeater #Container
Repeaters provide a convenient and flexible way to display repeating content on a page. A Repeater always makes space for itself, so that elements that appear under the Repeater are moved down when the Repeater is expanded, and moved up when the Repeater is collapsed.
Here is an example of a page that has a Repeater (that is currently hidden) under the text input.
[image]
This is what happens when the Repeater is expanded.
[image]
As you can see, the Repeater just rud…
Or you use another technique called → READ-MORE
In this case you set a fixed length of characters which can be added to each of repeater-items.
Those which have a bigger length of used characters in the description, those will be cropped → that means after the character-limit was reached —> … ← dots at the end of the text will be added and a READ-MORE-BUTTON occurs.
This way → all your REPEATER-ITEMS will have the same description-lenght (always same amount of CHARACTERS).