Hey there, I'm facing a little issue with my elements. These elements are being generated dynamically and I'd like to display them in a 4 column layout. The challenge is that they arrive separately and I can't simply wrap them in a div and use display:inline-block and float:left.
<section data-field="box-image">
<img
src=""
width="160" height="160" alt="">
</section>
<section data-field="box-content">
<h3>Aquarius</h3>
<p>20 January - 18 February</p>
</section>
<section data-field="box-image">
<img
src=""
width="160" height="160" alt="">
</section>
<section data-field="box-content">
<h3>Pisces</h3>
<p>19 February - 20 March</p>
</section>
This is how it currently looks: https://i.stack.imgur.com/10ba5.png
However, I want it to appear like this: https://i.stack.imgur.com/eA6KL.png
I've considered using jQuery or JavaScript to wrap them, but wonder if CSS could do the trick?
The HTML is being generated in the DOM as follows: {{#each infoContent as |item|}}
<div class="col-md-12 boxes-container">
{{{item.box}}}
</div>
{{/each}}
In essence, I want to wrap each box-image and box-content in a div so that I can style them with CSS. If there's another way to achieve the layout shown in my image, I'm all ears!