Enhance your webpage design with stylish CSS formatting using Bulma cards

My HTML output is as follows:

https://i.stack.imgur.com/aBdEF.jpg

It seems that the footer is not matching up with the cards...

The CSS component I am using looks like this:

.card-equal-height {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-equal-height
.card-footer {
  margin-top: auto;
  height: 100%;
}

.card-equal-height.card-footer does not seem to be functioning as expected. I want the footer to align with the order of the cards, regardless of the description length.

Here is the HTML code:

<div [ngClass]="{'card-highlight': product.listItemHovered}" class="card card-equal-height"
                 (mouseenter)="hoverListItem(product)"
                 (mouseleave)="hoverListItem(product)"
                 (click)="test(product)">
      <div class="card-image">
        <figure class="image is-square">
          <img [src]="product.imageURL" alt="{{product.title}}">
        </figure>
      </div>
      <div class="card-content">
        <p class="title has-text-centered"> {{product.title}}</p>
        <p class="subtitle">{{product.price | currency: "USD"}}</p>
      </div>
      <div class="card-footer">
        <p class="card-footer-item">
          <button (click)="removeFromCart(product); showRemoved()"
                  class="button is-danger is-outlined is-pulled-left is-small"> Remove
          </button>
        </p>
        <p class="card-footer-item">
          <button (click)="addToCart(product);showAdded()"
                  class="button is-outlined is-primary is-pulled-right is-small"> Add to Cart
          </button>
        </p>
      </div>
</div>

Answer №1

To adjust the height of the "card-content" without affecting the .card-footer, you can utilize flex-grow property.

.card-equal-height
.card-content {
  flex-grow:1;
}

For more information on flex properties, visit this link at css-tricks

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Difficulty reloading after updating input using AngularJS ngTable

I'm encountering an issue where I need to utilize ngTable with TableParams to load and modify a table. For instance, when the page initializes, entering a number in the textbox for the first time displays the appropriate number of rows in the table. ...

Exploring the internet using a specific font style and ensuring a

I am facing an issue with the fonts on my website. They work perfectly in all browsers when using http, but as soon as I switch to https, the fonts stop working in IE8 and lower versions. However, they do display correctly in ie9. When trying to access th ...

Flaws in the implementation of Github pages deployment hindered its

When I attempted to run one of my repositories on GitHub for deployment, I encountered an issue where the CSS and JS contents were not loading correctly. You can access the repository through this link: https://github.com/vipin10100001/agecalculator If yo ...

Struggling to make HTML5 validation function properly

I'm struggling to make HTML5 validation work in conjunction with AngularJS. Instead of displaying the error message, the form is submitted even when a field is required. If anyone has any insights on how to successfully implement HTML5 validation wi ...

Trying out the MatDialogRef overlayref: A step-by-step guide

What is the best way to test dialogref coming from MatDialogRef? dialogRef: MatDialogRef<testComponent>; displayBackdrop() { const backdrop = this.dialogRef['_ref'].overlayRef._backdropElement.style.display = 'block' ...

Centralized navigation bar

I am currently facing a challenge with centering my nav bar and I'm not sure how to proceed. The nav bar is placed within a class and a div, which is causing confusion for me. I have attempted to align it to the center and also tried using float:cente ...

Creating connections between different services and components

I'm having an issue with importing my service into my component as it's giving me a "cannot find module" error. Below is the code from selectHotel.component.ts import { Component } from '@angular/core'; import { GetHotelService } from ...

Javascript error specific to Internet Explorer. Can't retrieve the value of the property 'childNodes'

After removing the header information from the XML file, the issue was resolved. Internet Explorer did not handle it well but Firefox and Chrome worked fine. An error occurred when trying to sort nodes in IE: SCRIPT5007: Unable to get value of the proper ...

Mapping memory for FirefoxOS is like equivalent strides

Is there a way to create a memory mapped file in FirefoxOS, Tizen or other pure-JS mobile solutions? In the scenario of a mobile browser where you have large amounts of data that can't fit in RAM or you prefer not to load it all at once to conserve R ...

Struggling with React integration of AdminLTE3 sidebar treeview?

I have a requirement to create a React sidebar with a category 'Staff' that, when clicked, reveals three subordinate categories. Below is the code snippet: import React, { Component } from "react"; export default class Sidebar extends Componen ...

How to properly display an Angular Template expression in an Angular HTML Component Template without any issues?

When writing documentation within an Angular App, is there a way to prevent code from executing and instead display it as regular text? {{ date | date :'short'}} Many sources suggest using a span element to achieve this: <span class="pun"&g ...

The issue with dynamic sizing in React and Tailwind is that it does not consistently work with arbitrary sizes. Some sizes do not appear properly, causing items to

In this code snippet, I am attempting to create a circle component of dynamically sized using html div and Tailwind CSS w-[diameter] & h-[diameter] attributes in a create-next-app@latest project. However, the circle fails to render properly with certa ...

What is the best way to shade the background when a hyperlink is pressed?

I am currently working on customizing the navigation bar for my website. My navbar consists of five elements, and I want to make an element appear darker when it is clicked. Here's what I have attempted so far: Utilizing jQuery to modify the ac ...

Is it possible to access the attributes of an interface in TypeScript without relying on external libraries?

Ensuring the properties of an interface align with an object that implements it is crucial for successful unit testing. If modifications are made to the interface, the unit test should fail if it is not updated with the new members. Although I attempted ...

Tips for positioning elements within an ng-repeat list using absolute positioning?

Here is the HTML code: <div class = "container"> <form ng-submit = "createSticky()"> <input ng-model="formData.data" type="textarea" name="sticky_content" placeholder="add sticky text" required="true"/> <input ng-model= ...

Looking to extract a Twitter handle using Python's BeautifulSoup module?

I'm struggling to extract the Twitter profile name from a given profile URL using Beautiful Soup in Python. No matter what HTML tags I try, I can't seem to retrieve the name. What specific HTML tags should I be using to successfully grab the prof ...

Utilize Angular's effect() function to reset a form when a specific signal becomes true

Is my approach to using signals correct in this scenario? I have a form that needs to reset when the success signal is true. I implemented this with an effect, but the Angular documentation is not very clear on this topic yet (refer to here). **Do you bel ...

Arranging the button next to the text input field in an Angular application

I added a button labeled "X" to a page, but it is currently positioned below a textfield. How can I use Bootstrap to align the button next to the textfield instead? <div class="form-group row"> <div class="field"> <input ...

Enhancing the appearance of a Textfield with PHP and HTML styling

How can I adjust the width and center text in a textfield within a container? <input type=text style=width:90%text-align:center value=" . $rows[mysql_field_name($sql_result, 3)] . "> Setting the width in the style attribute works when isolated like ...

Integrating Angular with Django using the REST framework

Is there a way to serve Angular using only a Django server without the need for separate servers? I have created a frontend application with Angular 6 and backend with DRF, currently running the django server in the backend and using ng serve command for ...