Kids sitting at the table-cell bootstrap columns not stretching to their full height

I currently have 3 account cards, each with different content, that I want to take up the full height of a column with col-md-4 class.

After doing some research in [this][1] thread, it seems like using display: table is one way to achieve this. However, the issue I'm facing is that the divs within my columns are not occupying the full height despite setting them to display: inline-block and height: 100%.

Below is the HTML code snippet:

    .container {
    display: table;
    }

    .row {
    display: table-row;
    height: 100%;
    }

    .col-md-4 {
    display: table-cell;
    float: none;
    height: 100%;
    }

   

    .account {
        background: $overlay-color;
        text-align: center;
        display: inline-block;
        margin: 0;
        padding: 0;
        height: 100%;
    }
<div class="container">
            <div class="row">
                <div class="col-md-4">
                    <div class="account">
                        <h1 class="type">MINI ACCOUNT</h1>

                        <div class="details">
                            <h2 class="ad">A perfect account to start with!</h2>
                            <p class="detail">Spreads from 2.3 pips</p>
                            
                        </div>
                        
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="account">
                        <h1 class="type">STANDARD ACCOUNT</h1>

                        <div class="details">
                            <h2 class="ad">An ideal account for every investor!</h2>
                            <p class="detail">Spreads from 1.9 pips</p>
                            <p class="detail">Minimum deposit = $25 000</p>
                            
                        </div>
                        
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="account">
                        <h1 class="type">EXCLUSIVE ACCOUNT</h1>

                        <div class="details">
                            <h2 class="ad">An exclusive account for exclusive clients!</h2>
                            <p class="detail">Spreads from 0 pips</p>
                            <p class="detail">Minimum deposit = $50,000</p>
                            <p class="detail">Access to Daily Technical Analysis</p>
                            
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>

Answer №1

Give it a shot using flexbox

.container {
    display: table;
}
.row {
    display: flex;
}
.col-md-4 {
    float: none;
}
.account {
background: rgba(0, 0, 0, 0.34);
text-align: center;
display: inline-block;
margin: 0;
padding: 0;
height: 100%;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
  <div class="row">
    <div class="col-md-4">
      <div class="account">
        <h1 class="type">MINI ACCOUNT</h1>
        <div class="details">
          <h2 class="ad">A perfect account to start with!</h2>
          <p class="detail">Spreads from 2.3 pips</p>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="account">
        <h1 class="type">STANDARD ACCOUNT</h1>
        <div class="details">
          <h2 class="ad">An ideal account for every investor!</h2>
          <p class="detail">Spreads from 1.9 pips</p>
          <p class="detail">Minimum deposit = $25,000</p>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="account">
        <h1 class="type">EXCLUSIVE ACCOUNT</h1>
        <div class="details">
          <h2 class="ad">An exclusive account for exclusive clients!</h2>
          <p class="detail">Spreads from 0 pips</p>
          <p class="detail">Minimum deposit = $50,000</p>
          <p class="detail">Access to Daily Technical Analysis</p>
        </div>
      </div>
    </div>
  </div>
</div>

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

When Hovering, Pseudo-class Cannot be Applied

In my design, I have an image overlaid with a Play icon. The concept is that when the user hovers over the image, the brightness of the image decreases and the Play icon is replaced with a Magnifying Glass icon. However, there seems to be a problem. When ...

Master the art of filtering rows in an HTML table based on a select option when the mouse is clicked

I am trying to create a table that displays only the rows selected in a dropdown menu. Here is an example: If "All" is selected, the table should display all rows. If "2017" is selected, the table should display only the rows that have "2017" in the sec ...

Align Divs to Create a Centered Webpage

Allow me to preface this question by confessing that I am a self-taught (novice) web developer (and not very skilled at it). For a while now, I have been struggling to find an efficient method of centering web pages using AP Divs. I've experimented wi ...

Guide on displaying a Firebase Storage Document file (Docx) on a webpage using HTML

I'm struggling to display a .docx file from my Firebase Storage on an HTML page using the following methods: <iframe src="https://docs.google.com/gview?url=<Storage-Link>"></iframe> or <iframe src='https://view.officeapps. ...

trouble centering elements in bootstrap

It appears that when I try to center this image, it is slightly off-center to the right on the page. What could be causing this? It seems like there might be a margin added to the left of the image. <head> <meta charset="utf-8"> ...

Steps for performing a 'back' action within a div element using jQuery

Within my HTML, I have a div element containing a link. When the user clicks this link, I use AJAX to load new content into the div area. This new content includes a 'back' link that, when clicked, should revert back to the previous content. Cur ...

Creating a tooltip with a left arrow and a bordered design

I am looking to create a tooltip that displays its content after clicking on the tooltip tip icon. Currently, it only works on hover, but I want it to be clickable and mobile responsive. Desktop design should resemble: https://i.sstatic.net/FQPyt.png Mob ...

Here is a unique version: "Learn how to efficiently transfer data from multiple parent elements to another page using the same buttons by leveraging LocalStorage

I received assistance from mplungjan to create part of the code. Currently, I have created multiple buttons for various paragraphs, functioning as favorite buttons. My goal is to transfer these favorited paragraphs to a different page. For more details, yo ...

Learn how to toggle a specific div by clicking on an image generated from an ngFor loop in Angular version 11

One issue I am facing is that I have multiple sections containing image info and details. When I click on a specific image, the corresponding details should toggle. Everything works fine, however, if I click on another image without closing the previous ...

HTML Automated Email

I am currently working on developing a WIFI landing page that requires users to input their email address in a textbox. Upon clicking 'Connect', the entered email address will be sent to another designated email for review. While I have found co ...

The table's width exceeds the appropriate size

Take a look at the code snippet below <%-- Document : index Created on : Feb 7, 2014, 1:03:15 PM --%> <%@page import="java.util.Map"%> <%@page import="java.util.Iterator"%> <%@page import="analyzer.DataHolder"%> <%@p ...

What causes the double click on the button?

<div class="btn-group btn-group-toggle button-div" data-toggle="buttons"> <label class="btn btn-secondary" onclick="alert('option1');"> <input type="radio" name="op ...

Viewing content on a mobile device and using the scrolltop

I am working on a website that needs to be mobile-friendly. With the release of iOS 7, I wanted to achieve a depth and blurry effect. I used an iframe with a CSS3 filter applied to it and made it scroll along with the page using jQuery. Everything looks go ...

Ways to shift placeholder text slightly to the right within a select dropdown?

Struggling with this issue for hours, I can't seem to figure out how to: Adjust the position of the placeholder text (Search) by 10 pixels to the right in my select component Reduce the height of the field (maybe by 5px) without success. Could someo ...

The length of the LinearProgress bar does not match the length of the navbar

Utilizing the LinearProgress component from Material UI, I created a customized ColoredLinearProgress to alter its color: import React, { Component } from 'react'; import { withStyles } from '@material-ui/core/styles'; import { LinearP ...

Adjust the position of an SVG element based on its size using a transformation

How can I offset an SVG element relative to its own size using translate with a percentage, similar to how we would offset a div using transform: translate(100%,0)? Here is an example: This code: <div style={{ overflow: 'visible', position: ...

What is the best way to align and adjust the position?

I'm attempting to attach a button to a page. I may not be an expert, but here's what I have so far: body { width:100%; height:100%; background:#181516; overflow:hidden; position:absolute; } .bg { background:url(../im ...

Has anyone figured out the issue with Uplodify? It suddenly ceased to function

For some time now, I've been using uplodify without any issues. Unfortunately, as of yesterday, it suddenly stopped working. I'm at a loss as to what might have caused this sudden change. Could someone please offer me some assistance? I've ...

Inspecting the background color of a nested div using Selenium and Capybara

Looking for assistance on how to check the background color of a div. Here's the scenario: I have a div with an id, which contains another div without an id but with a class. Now, I need to verify the background color of this second div. Any tips woul ...

I am facing difficulties with invoking the popOpen() function within my parameters in JS, HTML, and CSS

I'm currently facing an issue with my code. I am attempting to invoke my openPop() function with the input parameter 'pop' within some of my sensor code, but no pop-up is appearing even though I believe I am calling the popup correctly. If a ...