I am currently developing a website on Drupal that showcases various rural products and services from multiple vendors. The main page features these items displayed in a grid format, each within a 'product card' containing vendor details, address, phone number, product image, name, price, and a 'Buy now' button. However, due to variations in the length of these attributes, the layout of the page appears disorganized (refer to this screenshot: ).
I have a couple of queries regarding this matter:
- Is there a specific web design technique to neatly display elements of different heights within fixed-sized containers? Is it achievable to standardize their heights?
- How can I align one div (vm_prod_cat) at the top and another(div offsite_selling) at the bottom of the cell? This potential solution could ensure that certain components of the product cards (such as vendor addresses) do not have uniform heights, but the overall layout maintains balance. I attempted to utilize the
display: inline-block;
,vertical-align: top;
, andvertical-align: bottom;
attributes, but encountered difficulties.
The grid in Drupal is generated with the following table cells and divs:
<tr class="row-3 row-last">
<td class="col-1 col-first">
<td class="col-2">
<div class="vm_prod_cat prod_cat_tur">
<div>
<div class="views-field views-field-uc-product-image">
<div class="vm_product">
<div class="offsite_selling">
</td>
<td class="col-3 col-last">
</tr>