Skip Navigation

[Résolu] Can you use flex box to do a display

This support ticket is created Il y a 7 années et 9 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Marqué : 

This topic contains 2 réponses, has 2 voix.

Last updated by AndreG3332 Il y a 7 années et 9 mois.

Assisted by: Luo Yang.

Auteur
Publications
#420366

I am trying to: get a view to use flexbox to display results

I visited this URL:hidden link

I have a view called Post categories that si a taxonomy view to display the category heading and the category image(Cpt) in a same flex-box box.

This is a field that will dynamically grow so need to react the same way as the table will react.

Here is the current code of the loop sections.
Loop

[wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
    <table width="100%" class="wpv-loop js-wpv-loop">
    <wpv-loop wrap="4" pad="true">
        [wpv-item index=1]
        <tr>
            <td>
                [wpv-post-body view_template="Home page categories"]
            </td>
        [wpv-item index=other]
            <td>
                [wpv-post-body view_template="Home page categories"]
            </td>
        [wpv-item index=4]
            <td>
                [wpv-post-body view_template="Home page categories"]
            </td>
        </tr>
        [wpv-item index=pad]
            <td></td>
        [wpv-item index=pad-last]
            <td></td>
        </tr>
    </wpv-loop>
    </table>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]

What would be the correct approach to achieve this?

#420541

Dear Andre,

Are we talking about the CSS3 Flexible Box:
hidden link

If it is, I suggest you follow above document to format the Views code of the loop sections, for example:

...
<div class="flex-container">
<wpv-loop>
        <div class="flex-item">[wpv-post-body view_template="Home page categories"]</div>
    </wpv-loop>
</div>
...
#420615

HI Luo Yang,

Yes you assumption was correct. I was complicating it in my mind looking at how the tables work.
That was awesome easy! I was expecting pages of coding! Thx for you assistance.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.