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?
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>
...
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.