Group social elements in Pro builders so they can be displayed inline within a "column" flex-layout container

Working on a footer in Pro:

From the above image, I’m sure you can see my dilemma… I can’t figure out a way to have those social icons display inline, or inline-block.

The bar has a flex layout of row, so that the two containers appear as columns. But those containers have a flex layout of column so that the individual elements inside of them are stacked, one on top of the other. But because I can’t group the social elements into their own container, they also are displayed as vertically stacked, rather than horizontally as I would like them.

Is there a way to achieve this?

Thanks in advance for your assistance!

Hello There,

Thanks for writing in! Please edit your header and have a separate container for your social icons. You can have it’s container as row and then for each social icons, you may use columns so that it will display inline.

Hope this helps. Please let us know how it goes.

But if the “bar” is set to flex-direction: row and I create a separate container for the social icons, then that container will not display below the sign-up form like I want it to, but instead will create a 3-column layout, with the social icons occupying the 3rd column. Am I missing something?

This is what will happen if I create a new container:

There needs to be an option to add a container within a container, but I don’t see that option…

UPDATE:

So I found a way to achieve my desired layout by using the wrap children
setting. If I set my second container to flex-direction: row and then tick the wrap children box, then the social elements display inline underneath the signup form.

But when the viewport narrows, the desired effect is lost:

One might suggest that I use the customize options to hide this whole bar at certain media query breakpoints, but the incorrect wrapping happens in between the tablet and laptop breakpoints, so I would have hide this whole bar at the Laptop and below, which doesn’t seem like it should be necessary. The whole approach is unstable, because it is dependent upon the width of each element in the container. If the sign-up form was any smaller, then the social elements would not wrap to the next line, so this approach only works because the sign-up form is big enough to cause the wrapping.

I think there needs to be the ability to add containers within containers. Only having 3 layers of nesting available is not sufficient for many layouts. And only having preset breakpoints is also a bit constrictive. Maybe consider an option in the customize settings to set specific pixel breakpoints.

Also, there should be a way to drag and drop elements from one container to another. That would save a BUNCH of time and repetition. Feature request :slight_smile:

1 Like

Hello There,

Thanks for getting back to us. It’s good to know that you have figured out a way to resolve your issue. And we also appreciate your feedback. We’ve added this as a feature request so it can be taken into consideration for future development.

Best Regards.

Um… I didn’t actually find a solution. Using wrap children with flex-direction: row is unstable/unpredictable.

I still need some assistance with this. How can I display multiple social icons horizontally, underneath another element?

My hope is to achieve the layout pictured in the second-to-last screen-cap in my above post. Any advice?

Hi there,

I need to check your sample first, would you mind providing a video recording? Maybe it needs multiple wrapper since you can’t align them with single wrapper only.

Thanks!

Yes. Multiple wrappers! That’s exactly what I need. Is there a way to add a container around the social elements? That is what I was hoping for. I’m not sure how to do a video clip, but here is a screencap of my layout:

In my desktop bar I have 2 containers which become the two columns. And in that second “Social Links” container I need the Text element in order to display a form (via a shortcode), and then the social elements directly below the form, displayed inline as they appear in the screencap. I was only able to achieve this by using the wrap-children option, but I don’t ever want those social icons to wrap. I want them to always be together, inline. So I really need the ability to put them all into a container. Is there a way to do that while still having them in the same column/container as the form? I didn’t see an option to add a container within a container.

Let me know what you think.

Same problem here. I’m trying to do something similar. I added the social icons in my footer section, but the elements are in a column, and the elements are stacked on top of each other (3 text elements, and 2 social elements). When it comes to the social elements I need them to be in a row. Not sure how to do this in the header builder using v2 elements, and not resorting to placing social shortcodes in a text element… Any help would be appreciated. Thanks

Hi there,

I see, in that case, you can only do that by creating your own wrappers instead of using flex layout. Example, you can create two rows, the first row has 3 columns and the second row has two, and aligned them in the center. You may use cornerstone row and column shortcode for that. Then in each column, just add icon shortcode and text.

It’s flex limitation and there can’t be multiple layout directly from the parent flex. It needs to be nested but nesting isn’t possible at this moment. Hence, text element and shortcodes are the only options for now.

Thanks!

Hopefully you can report “nesting” to the dev team as a feature request.

Howdy, @adaptifyDesigns and @Stephenk!

I wanted to jump in here to let you know that while this layout situation is unique, it is still achievable within the builders as things stand. Including some sort of “nested” wrapping functionality would require a near complete overhaul of the interface to include a new layer to interface with like that, which is likely not to be used all the time in most situations. So while that is not something that would be anywhere on a timetable at this point, you will still be able to achieve your desired results as you’ll see below.

First, the situation at present we’re dealing with is a bar with two containers, equally spaced, both with centered content, and the one on the right has the social icons that we need in line on the last “row” at the bottom of the container. I’ve mocked up a simplified example below that we’ll use for this discussion (In lieu of a form, I’m using a button at the moment to illustrate the technique I’m about to show):

@adaptifyDesigns, you are on the right track in this thread. While you might instinctively think to change this Container’s Flex Layout to Column to get the layout you want, the issue with that is all your items are direct children of the container, so each button will layout in a column formation as well, when what we really want is for them to be in a horizontal line. Keeping the Flex Layout as Row and enabling the Wrap Children checkbox on that container is the first thing you’ll want to do (which you mentioned above).

The problem you encountered is when your form shrunk down in size. In your screenshots above, initially it seems that the form is filling up the entire width of the container, but then at a certain breakpoint the form itself collapses to a column layout, reducing its overall width. Since the new width of the form is less than the width of the container, this gives our social elements room to “move up” back into the same line with the form. So the issue here is not with the technique you’re using, but rather the elements themselves. Notice what happens if I include a Text Element above my social buttons using my example:

This example works because my text is long enough to always fill up all the space in a row, forcing all items below it to the next “row.” If my text was too short, I could force the text container to be fullwidth by changing its Width value you see in that screenshot from auto to 100%. This works for something like text, but might not be as desirable for other elements (re-enter our button):

Notice that we’re using the 100% width technique to force our button to push all elements below down. This gives us our desired result for the social buttons as they will never be able to come back up in line with the button, but what if we want our button to keep it’s original form? This is where we can use a Line Element to make everything work as we want:

Here I have included a Line Element and made its width 100%, it has no max width, a height of 20px, and its color is transparent. This invisible, fullwidth line will always ensure that the space between your elements on top and social links below is kept, and the social links will never find their way back up in line with the element above. So if we substituted my button for your form in your previous screenshots, even when your form collapses to a column layout and has a max width placed on it, the social links would never come up because the invisible line we’ve included is being used as a barrier to section things out in the manner that we need. Also, giving the line a height to use as a spacer helps keep it clickable directly in the preview area, so you can get back to it easily and not have to inspect it from the Layout screen only.

Hopefully this helps to point you in the right direction and gives you some ideas for how you can achieve your designs moving forward.

Cheers!

1 Like

@kory Hey I really appreciate this detailed walk-thru/demonstration. That is a great solution. Sorry I didn’t reply earlier, I lost track of the thread.

Thank you!

I had a similar issue, thanks so much for your help, this worked perfectly!

@adaptifyDesigns and @mrsnooch,

Very glad to hear that you found this response helpful. :slight_smile:

Cheers!