I'm facing an issue with two stacked "columns" of divs that are supposed to be side by side, each representing a table row. However, if one div in the left column has more content lines than its corresponding div on the right side, the rows get misaligned. I'm looking for a way to set the height of these divs so they match each other.
Check out this picture for reference, where you can see the problem occurring in the third row.
This setup is within a Mediawiki farm environment, and due to certain constraints from both Mediawiki and the extensions used, I am unable to access the HTML directly or create a traditional table. Therefore, I'm seeking a CSS-only solution. I've explored using calc() and variables in a stylesheet, as well as tried display:table but haven't been able to figure it out.
<!--The Header -->
<section class="pi-item pi-group pi-border-color pi-collapse" data-item-name="itemAttributes">
<h2 class="pi-item pi-header pi-secondary-font pi-item-spacing pi-secondary-background">Attributes</h2>
<!--The first column -->
<section class="pi-item pi-group pi-border-color" data-item-name="itemAttributeNames">
<div class="pi-item pi-data pi-item-spacing pi-border-color" data-source="ability1name">
<div class="pi-data-value pi-font">Darkvision</div>
</div>
<div class="pi-item pi-data pi-item-spacing pi-border-color" data-source="ability2name">
<div class="pi-data-value pi-font">Thick Skin</div>
</div>
<div class="pi-item pi-data pi-item-spacing pi-border-color" data-source="ability3name">
<div class="pi-data-value pi-font">Invulnerability</div>
</div>
<div class="pi-item pi-data pi-item-spacing pi-border-color" data-source="ability4name">
<div class="pi-data-value pi-font">Shapeshift</div>
</div>
</section>
<!--The second column-->
<section class="pi-item pi-group pi-border-color" data-item-name="itemAttributesDesc">
<div class="pi-item pi-data pi-item-spacing pi-border-color" data-source="ability1">
<div class="pi-data-value pi-font">The helm allows the wearer to see in dim light.</div>
// Other ability descriptions go here
</section>
</section>
Currently, the CSS just sets the two sections to 50% width and floats them left (along with some other non-critical styles).