CSS: Automatically resize all divs to match the height of the tallest div when content is added

My component consists of divs with text inside, utilizing the overflow-wrap: break-word property to ensure the text fits correctly. As seen in this image on PC screens: example

However, when I decrease the screen width, some words break and only certain divs change height, visible in this image for small screens: example

View the HTML markup here.

The issue at hand is how can I ensure that all the divs adjust size accordingly in this scenario?

Answer №1

If you're looking for a suggestion, I recommend using a table for that.

<table style="width:100%">
  <tr>
    <td>
      {firstname} {lastname}
    </td>
    <td>
      {card}
    </td> 
    <td>
      {payed}
    </td>
    <td>
      PDF
    </td>
  </tr>
</table>

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

Struggling to retrieve a JSON object from an Express and Node application, only receiving an empty result

Can anyone assist me? I'm having trouble with the res.json() function in my code. It seems to work after the first request, but not after the second. Right now, my application is quite simple - it scrapes user data from social media platforms like Twi ...

Having trouble integrating THREE.js with ES6 syntax

I am attempting to display a three.js scene inside a div using create react app. However, I am encountering an issue with an undefined THREE object. I have tried the following: npm install --save three import * as THREE from 'three' Unfortuna ...

Guide to generating a fresh div element with a distinct identifier through jQuery

Sorry if this question has already been addressed. I have come across similar inquiries but none provided the optimal solution. Let's suppose I have the following code: <div id ="test"> hello </div> Now, I am looking to insert a new div ...

Using the Twit package on the client side: a step-by-step guide

I have been utilizing the Twit package for searching tweets. After executing the js file in the console, I am able to see the tweets but when trying to use them on my webpage, an error 'Uncaught ReferenceError: require is not defined' pops up. Th ...

Concealing the div during the initial page load

person.jsp <script type="text/javascript"> function validateadvance() { document.getElementById("fn").style.visibility = "visible"; } $(function() { $(".dp").datepicker(); }); </s ...

Utilizing Pseudo Elements within the QT Designer Interface

I was attempting to add a vertical line to the left of a button with a hover effect using a pseudo-element in qt-designer styleSheet, but it was not displaying correctly. Here is the code I used: QPushButton{ position: relative; padding: 10px 20px; border: ...

Click to open a Swipeable Drawer using an onClick event handler in Material UI

Issue Encountered: Currently, in the provided documentation code (https://codesandbox.io/s/cnvp4i?file=/demo.tsx), the drawer opens when the "Open" button is clicked at the top. However, I am looking to have the drawer triggered and opened when it is direc ...

Set the default value for a form control in a select dropdown using Angular

I've been struggling to figure out how to mark an option as selected in my select element, but I haven't had any luck. I've tried multiple solutions from the internet, but none of them seem to be working for me. Does anyone out there have ...

Ways to determine if the top, right, bottom, and left of an element are set to "auto" in

Is there a way to determine if the top, right, bottom, or left values are set to auto or a specific value in Firefox? Unlike other browsers where $(element).css('top') may return auto, Firefox returns a specific value. ...

Setting state in a functional component is not possible when data is being fetched from Firebase in a ReactJS application

useEffect(() => { console.log("mounted"); all.db.ref("NewDonor").on("child_added", (data) => { var DataFromDB = data.val(); state.donor.push(DataFromDB); console.log(state.donor); setState({ donor: DataFromDB ...

Utilizing JSX and Lodash to extract distinct values of object properties into an array

I am currently working on creating an array of distinct values extracted from a collection of objects. Below is the data structure: data: [ { "tags": [ { "name": "tag", ...

The <input> element is not functioning as expected when attempting to use it as a button. I am struggling to find the solution to

My HTML file contains: <!Doctype HTML> <html> <head> <title>Orange’s Game</title> <meta charset="utf-8"> <script src="game.js”></script> </head> <body> <input type="button ...

Break apart PDFs into individual images or convert to HTML

I'm currently working on a project that requires the development of a unique webtool. The purpose of this tool is to allow users to effortlessly upload their PDF documents, which will then be displayed in a browser with an engaging page flip effect ut ...

The navigation bar and footer are not utilizing the entire width of the browser

Something seems off on the Safari browser, as there's still a gap in the right side of the navbar and footer. I've been using Bootstrap and steering clear of Javascript. Any ideas on how to fix this? Appreciate any help. Thanks! Here's the ...

Tips for dynamically including classes in NextJS component with class names from CMS?

I am in search of a solution that will offer some styling flexibility within a CMS to dynamically alter the classes of specific components within my NextJS application. The code snippet I'm working with is as follows: pages/index.js: ... import clien ...

Is there a way to adjust the transparency of an image without affecting any overlaid text while using Bootstrap's carousel feature?

I am currently working with Bootstrap v4 to build a carousel featuring an image with caption text. My goal is to have the image faded while leaving the text unaffected. Despite trying several non-Bootstrap solutions, I have been unsuccessful in achieving t ...

Prevent form submission by using jQuery's replaceWith method when the input type is a submit button and the onClick event is triggered

Below is the HTML code snippet I am working with: <input class="button" name="save" onclick="$(this).replaceWith('<img src=http://www.example.com/images/ajax-loader.gif />');" type="submit" value="SUBMIT"> After clicking on the butt ...

The content is not being displayed on the webpack dev server

Encountering an issue while running the webpack dev server with npm start command. Upon running the command, the output displayed is as follows: ➜ directory git:(staging) ✗ npm start directory @1.0.0 start directory BUILD_DEV=1 BUILD_STAGING=1 ./n ...

Conflict in upstream dependency detected in npm sanity/client

Currently, I'm in the process of developing a Next.js/Sanity project and it seems like there might be an issue with duplicate installations of the Sanity client. The error message displayed in my command terminal is as follows: npm ERR! code ERESOLVE ...

Choose various widgets

Does anyone know where I can find a widget that resembles a <select multiple="multiple">, with an expanded dropdown featuring a scroll bar, but limited to only selecting one option? ...