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

Customizing skin CSS for DNN Portal and Page images

Currently, I have a unique custom skin that I personally created. It is implemented on multiple portals that I am responsible for managing. My goal is to incorporate the ability for the header image to change based on the specific page being viewed. The he ...

Validating data in rows of a table using Angular 2

One of the challenges I'm facing is figuring out how to properly validate controls that are contained within a table row. Here's an example of the HTML code: <tr *ngFor="let items of myList"> <input class="form-control" [ngModel]="item. ...

Ways to shorten text on mobile screens using CSS

Is it possible to use CSS to truncate text based on the current screen size or media queries? For example, consider this paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam porta tortor vitae nisl tincidunt varius. Lorem ipsum dolor ...

Clicking on the Edit button does not result in any changes to the HTML on the page following a table

My current setup involves a button that is supposed to toggle between 'Add New User' and 'Update User' elements when clicked. However, it seems to work only when the table has not been filtered. Once I apply any kind of filtering on the ...

What is the best way to position a <label> to the left of an <input> field?

Examining the HTML and CSS code below: * { box-sizing: border-box; } .field { overflow: auto; } .field label { float: left; width: 80px; } .field input { display: block; width: 100%; } <div class="field"> <label>Test< ...

Changing an HTML container using jQuery and Ajax to facilitate a login process

Currently, I am on the lookout for a unique jQuery plugin that can replace a div when a successful login occurs. Despite searching multiple times on Google, I have been unable to find an ideal plugin that meets my specific needs. Do any of you happen to kn ...

Upgrading Angular causes issues with fileReplacements not functioning properly for assets

Since upgrading Angular, I have encountered an issue where fileReplacements no longer work with assets. Here is the code snippet that I am using: "fileReplacements": [ { "replace": "src/assets/scss/x.scss", ...

Utilizing BootStrap for a more Dynamic and Reactive Web Design

Here is the HTML code I am using along with bootstrap: <div class="row"> <div class="col-sm-4" style="background-color:lavender;">.col-sm-4</div> <div class="col-sm-8" style="background-color:lavenderblush;">.col-sm-8</div> & ...

The initial JSON array is displaying correctly, however the subsequent nested arrays are appearing as [Object, object]

I am currently utilizing a wordnik API to gather the word of the day and extract array information. However, I am encountering an issue where the nested arrays are displaying as "object, object" rather than the expected data <script src="https://ajax ...

Learn the process of marking an option as selected within an Angular component

I have an Angular component that displays a question along with a dropdown menu (<select>) to choose from various answers. My goal is to programmatically set one of the options as selected based on certain parameters present in the application' ...

Main content with a floating aside menu

I am currently using the CoreUI admin template. The layout I have set up is the basic one outlined on the following page: My goal is to make the aside menu appear on the right side of the main content, floating over it rather than inline and reducing the ...

Modify the styling of the initial picture in a Google Drive file

Having an issue.. I am working on a website where each page is managed through Google Drive. I need to change the CSS styling of only the first image on one specific page. Using :first-child won't work because the HTML structure contains "p > span ...

The screen-responsive navigation bar is experiencing functionality issues

I am facing an issue with my navigation bar on both desktop and mobile. When I maximize the window while the mobile navbar is open, it disappears as expected but the desktop navbar does not appear. I am using a bootstrap template and I am unsure if solving ...

Having a newline between HTML elements can disrupt the structure of an HTML layout

It's common knowledge that in html, a newline between elements is treated as space. However, I find it quite alarming when working on responsive layouts. For instance, take a look at this example where the expected and correct behavior is achieved on ...

Issues with mobile stylesheet loading properly

After migrating my website to a new server, I encountered an issue where the text displayed incorrectly on mobile devices but appeared fine on laptops. Surprisingly, when using Chrome's mobile viewer for inspection, everything looked as it should with ...

<Select> Placeholder customization

For my react project, I am utilizing material-Ui and I am looking to have a placeholder that stands out by having grey text instead of black when compared to the selected item. <Select name="answer" value={values.answer} onChange={handleChange} onBlur= ...

Refreshing the webpage upon submitting with Angular2 and Firebase technology

Yesterday, I came across an Admin HTML template that I wanted to integrate with Firebase. However, when I tried to register and clicked on Sign in, the page would reload instead of carrying out the Firebase createUserWithEmailAndPass process. Here is a s ...

What is the best way to indicate progress as the canvas resizes an image?

Is there a way for me to access progress updates? My main focus is on receiving progress information, regardless of how it will be displayed. I may choose to use a progress bar in the future, but my current inquiry pertains solely to obtaining the data it ...

Issue with Safe Navigation Operator in Angular 2 not functioning properly when used in template property binding

Ng: 13.3.11 TS: 4.6.4 When using the safe navigator in an Ng template, an error is encountered in IntelliJ Idea with the following expression: [innerHTML]="foo.bar.baz[v1].foobar[v2]?[v3]?[v4]?[v5]" error: Parser Error: Conditional expression. ...

3D Animation for All Browsers

I'm currently working on creating a small browser-based game and I've been experimenting with animations to get the desired effect. So far, the animation works well in Opera and Edge, although there is a slight cropping issue in Edge. Unfortunat ...