consistent height across the div when expanding

There is a recurring issue I encounter where it takes too long for me to solve the problem. My goal is to ensure that the bootstrap boxes at the bottom of the page have the same height. I attempted to set a fixed height in pixels using my CSS, but this caused problems. I also tried setting a percentage height, but that did not work either. What is the correct way to set the height so that all the boxes expand to the same height when additional text is added?

Portfolio

HTML (I've only inserted one column here to avoid filling up the code section too much)

@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");
 .panel-pricing {
  -moz-transition: all .3s ease;
  -o-transition: all .3s ease;
  -webkit-transition: all .3s ease;
}
h3.panel-pricing {
  color: #999;
  font-size: 20px;
}
.panel-pricing .panel-heading {
  padding: 20px 10px;
}
.panel-pricing .panel-heading .fa {
  margin-top: 10px;
  font-size: 58px;
}
.panel-pricing .list-group-item {
  color: #777777;
  border-bottom: 1px solid rgba(250, 250, 250, 0.5);
}
.panel-pricing .list-group-item:last-child {
  border-bottom-right-radius: 0px;
  border-bottom-left-radius: 0px;
}
.panel-pricing .list-group-item:first-child {
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
}
.panel-pricing .panel-body {
  background-color: #f0f0f0;
  font-size: 40px;
  color: #777777;
  padding: 20px;
  margin: 0px;
}
<section id="plans">
  <div class="container">
    <div class="row">

      <!-- item -->
      <div class="col-md-4 text-center">
        <div class="panel panel-danger panel-pricing">
          <div class="panel-heading">
            <i class="fa fa-money" aria-hidden="true"></i>
            <h3>Plan 1</h3>
          </div>
          <div class="panel-body text-center">
            <p><strong>$100 / Month</strong>
            </p>
          </div>
          <ul class="list-group text-center">
            <li class="list-group-item"><i class="fa fa-check"></i> Personal use</li>
            <li class="list-group-item"><i class="fa fa-check"></i> Unlimited projects</li>
            <li class="list-group-item"><i class="fa fa-check"></i> 27/7 support</li>
          </ul>
          <div class="panel-footer">
            <a class="btn btn-lg btn-block btn-danger" href="#">BUY NOW!</a>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

Answer №1

Revise the CSS and include min-height

.pricing-box .content {
    background-color: #f0f0f0;
    font-size: 40px;
    color: #777777;
    padding: 20px;
    margin: 0px;
    min-height: 115px;
}

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

Create Stylish Popups and Spacious Containers with CSS

A unique pure css popup was crafted by merging and . Hovering over "John Smith" triggers the appearance of the popup. The code for this can be seen at http://codepen.io/kikibres/pen/MwEgQX. However, there are some challenges being faced. The aim is to ke ...

When attempting to shift the label above the input field upon focusing, it unexpectedly becomes concealed

I am attempting to reposition the label above the input field when it is focused, but instead it becomes hidden. label > span::focus { top: -20px; font-size: 15px; color: blue; } Check out the complete Html & CSS code. Update: ...

Having difficulty selecting a cloned div using jQuery

I am in the process of creating a dynamic menu that switches out sub-menus. <nav id="main-menu"> <div id="categories"> <a id="snacks" class="categ">Snacks &amp; Sweets</a> <a id="pantry" class="categ"> ...

The functionality of aos.css seems to be malfunctioning on a Django-powered website

I recently set up a django backend website and attempted to incorporate CSS in my HTML using the following code snippet. {% load static %} <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-wid ...

Arrange flex list items in vertical rows on smaller screens for a more organized layout

Struggling to have CSS flex list stagger text on two lines for smaller screens, but so far, my attempts have failed. I've tried using spans and br at various media queries, but nothing seems to work. Any assistance would be greatly appreciated. This ...

Incorporate 3 additional compound filters with shuffle.js

Is there a way to add a third compound filter to the existing shuffle.js code provided below? // ES7 will have Array.prototype.includes. function arrayIncludes(array, value) { return array.indexOf(value) !== -1; } // Convert an array-like object to a r ...

Adding a class to radio buttons with a specific label using jQuery

As of now, I am utilizing jQuery to apply or remove a class when a radio button is selected. However, the issue arises when it checks all radio buttons, resulting in CSS being added to only one radio button. My HTML layout consists of rows containing eith ...

Utilize jQuery to wrap text within <b> tags and separate them with <br> tags

Upon receiving output in html string format from services, I am presented with the following: "<html>↵<h1>↵Example : ↵<br>Explanation↵</h1>↵<hr>↵<b>key1 : ABCD <br>key2 : 2016-10-18-18-38-29<br> ...

The webpage contains duplicate ID attribute value "x" that has been identified

In my Angular 7 project, three components (a, b, c) all use an input element with the same id of "x". However, component b has 4 input elements all using the id "x" as well. This poses Accessibility Issues as ids must be unique. The test cases utilize &apo ...

Adjusting the position of text within a table cell using HTML

My task is to design a website using only tables (the old-fashioned way). I've made some progress with the layout, but being limited to tables and HTML poses some challenges. <body> <table width="1173" height="703" cellspacing="0" cellpaddi ...

Transferring HTML table information to Django models for efficient data management

I am currently developing a student attendance management system using the Django framework. The objective is to fetch all the names of the students from the student database and display them in an HTML table. Additionally, I will be updating the informati ...

What is the reason behind the overflow in the HTML body?

I am currently honing my skills in front-end development by attempting to replicate the functionality of . Everything seems to be working fine, except for the fact that there is an overflow issue identified within the <body> element when inspecting w ...

What is the optimal method for invoking a Javascript function via a hyperlink?

I'm looking to include links on my website that will activate a javascript function when clicked, and I do not want these links to be underlined. Additionally, I want the cursor to change to a standard pointer. What is the most effective way to achiev ...

Position divs to align text beside icons

I am currently working on a Bootstrap popover to display various pieces of information, each containing an icon and some text. Additionally, I am incorporating twig into this project. Here is the HTML structure: <span class="fa fa-user instructor-con ...

Positioning a text field and a button adjacent to each other within the same row

My challenge is to consistently position a textfield and a button side by side. The requirement is for the button to always be on the right side of the screen, while the textfield should take up the remaining width on the left side. I initially tried setti ...

Guidelines for crafting an intricate selector by utilizing mergeStyleSets and referencing a specific class

I'm currently in the process of developing a web application using ReactJS. In my project, I have the following code: const MyComponent = (props: { array: Array<Data> }) => { const styles = mergeStyleSets({ container: { ...

Flexbox keeps elements on the same line without breaking

I'm currently delving into flexbox and aiming to create a layout similar to the one shown below: https://i.sstatic.net/epnkU.png Here is the code I have come up with: .container { display: flex; gap: 26px; } .flex50 { flex: 50%; ...

How to trigger a JavaScript function using a link in CakePHP?

When working with Html, <a href="some_url"> Contact Seller </a> In the realm of Cakephp, <?php echo $this->Html->link('Contact Seller', array('controller'=>'pages', 'action'=>'conta ...

Why do all the select boxes require two clicks to open the drop-down menu when the function is activated?

After implementing this code on my webpage, I noticed an issue where all select boxes required two clicks from the user to open the drop-down menu. The first click seemed to set focus on the box, and only on the second click would the drop-down actually ap ...

Once the PHP page loads, it becomes challenging for me to dynamically change values in JavaScript

Within my code snippet below, I am aiming to modify the initial value using a slider. The slider appears to be functioning correctly; however, it is not updating the values of timeout as indicated beneath the line $('ul.<?php echo $this->session ...