What are some ways to display multiple divs within a single popup window?

I am attempting to create the following layout:

https://i.sstatic.net/OzE98.png

Here is what I have been able to achieve:

https://i.sstatic.net/7GxdP.png

In the second picture, the divs are shown separately. My goal is to display the incoming data in a single popup like in the first picture, but I am having trouble accomplishing this.

HTML

<div className="installmentinfo__container">
  {
    props.installmentList?.map((e, i) => {
      return (
        <div className="installmentinfo">
          <div className="column">
            <div className="installmentnumber" >{(i + 1).toString()}</div>
            <div className="installmentdate">{e.date}</div>
            <div className="installmentamount">{e.amount} {e.currency}</div>
          </div>
        </div>
      );
    })
  }
</div>

CSS

.installmentinfo__container {
  position: absolute;
  right: 340px;

  .installmentinfo {
    background-color: white;
    width: 280px;
    height: auto;
    border: var(--border);
    border-radius: 0.5em;
    padding: 0.5em 1em;

    .column {
      display: flex;
      margin: 5px;
      justify-content: space-between;
      font-size: 1.3rem;
      border-bottom: 1.5px solid #d1d1d1;
    }

    .installmentnumber {
      float: left;
    }

    .installmentdate {
      width: 50%;
      color: black !important;
    }

    .installmentamount {
      width: 50%;
      color: black !important;
      font-weight: 1000;
    }
  }
}

Answer №1

Check out this CSS styling:

.payment-details__container{
   border: 1px solid #d1d1d1;
   border-radius: 10px;
   width: 320px;
   box-shadow: 2px 2px 4px 4px #d1d1d1;

  .payment-details {
       background-color: white;
       width: 280px;
       height: auto;
       border: var(--border);
       border-radius: 0.5em;
       padding: 0.5em 1em;

   .column {
      display: flex;
      margin: 5px;
      justify-content: space-between;
      font-size: 1.3rem;
      border-bottom: 1.5px solid #d1d1d1;
    }

    .installment-number {
       float: left;
    }

    .installment-date {
       width: 50%;
       color: black !important;
    }

    .installment-amount {
       width: 50%;
       color: black !important;
       font-weight: 1000;
    }
  }
}

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

The GridFS/multer module is encountering an issue where it is unable to access the 'filename' property of an undefined

My knowledge in web development is limited, so forgive me if this question seems naive. The issue I am facing involves Node.Js and the creation of a database to store and display images on a browser using an .ejs file. While I can successfully log the im ...

Troubleshooting issue: React rendering does not seem to be effective when

Why is the first render successful, but the second one fails? // import React library var React = require('react'); var ReactDOM = require('react-dom'); //Create our first component /* StorePicker */ var StorePicker = React.create ...

Nested jquery tabs

Similar Question: Unable to get jquery tabs nested I am trying to create a nested tab, but haven't found a satisfactory solution through my research. Can anyone provide me with some guidance? I have limited experience in JavaScript or jQuery prog ...

Adapting React component tags on the fly

As I work on creating a Landing page for my project, I'm aiming to streamline my code by implementing a helper function to display the four different paper components. Everything seems to be functioning correctly except for showing the Icon components ...

Learn the steps to invoke a JavaScript function from a <td> element within an ng-repeat loop

How can I call an Angular function inside ng-repeat td and replace the value from the function with the value in the td element? The code snippet provided below is not functioning as expected. Instead of getting the date, the same getCSTDateTime function i ...

Error encountered with underscore template - Unforeseen SyntaxError: Unexpected token <

I encountered an error when attempting to load one of my underscore templates. It seems to be related to an issue in the for loop, which I suspect should be a .each loop, but I'm still trying to grasp its structure. Here is a snippet of my template: ...

How to Safely Merge Data from Several Excel Files into a Single Worksheet in Google Sheets using ExcelJS without Overwriting Existing Data

Just to clarify - I'm not a seasoned developer, I'm still a newbie at this. My current challenge involves transferring data from multiple Excel files located in one folder to a single worksheet in Google Sheets. To do this, I am utilizing excelJ ...

Retrieving information from MySQL using javascript

I am trying to fetch data from a MySQL database using JavaScript. This is the script I have used to load the JavaScript: <script type="text/javascript" src="http://www.domain.de/content/entwicklung/layer.js"></script> Here is the actual scri ...

Adjust the size of the image to fit within the div container following

<div id="homePage" style="position: relative; margin: 0px; width: 320px; height: 420px;"> <img id="userImg" src="images/5.jpg" width="100%" height="100%" onclick="imageClick()" style=" z-index: -1; margin: 0 ...

When using React Redux to update a FlatList item, the item is transformed into an array instead

Incorporating react redux with react native, my app features a flatlist of photos. I encountered an issue where upon clicking the like button for a photo, only that particular photo should be updated in the flatlist. Despite successfully updating the like ...

"Struggling with solving an error in METEOR REACT SEARCH and DISPLAY upon user input onChange? Let

Here is the input code snippet: Title: <input type="text" ref="searchTitle" onChange={this.searchTitle}/> This function handles the onChange event: searchTitle(event) { this.setState({ show_article_editable_list: <Article_Editab ...

Choose the date automatically upon opening the MUI datepicker dialog

By default, I initialize my selected date as null. However, when passing this state to the datepicker, the dialog does not automatically select any date. What I actually want is for the dialog to auto-select today's date so that I only need to press O ...

The component `style` requires a callback function as a getter for its configuration, but `undefined` was received instead. Remember to always capitalize component names at the beginning

When working with the MUI library in React Native, I encountered an issue: ERROR Invariant Violation: View config getter callback for component style must be a function (received undefined). Make sure to start component names with a capital letter. I ha ...

How can I shift the collapse/expand icon to the right side of the Material TreeView?

I am currently in the process of building a tree structure using Reactjs. However, I have a specific design requirement where the collapse and expand button should be positioned on the right side. Additionally, I encountered an issue when trying to add an ...

Timing of Vue mounting and initialization phases

I am currently working on a component where I pass the reference to an internal element to the parent using defineExpose. In this example, I simply log the element, but in my actual project, I intend to manipulate it. SFC Playground // Comp.vue <scrip ...

Utilize Angular's ng-repeat directive to iterate through this JSON data structure for implementing user-to

Struggling with the user-to-user messaging interface on an app and having difficulty using ng-repeat on the items. Here is the provided data: { "ID": 4118, "CreatedDate": "2015-08-20T03:12:50.397", "recipient": [ { ...

How to Remove Border and Shadow Below Header in React Native

In my react native app, I have a custom header that sits on top of another header to extend the height and add extra content. However, I'm facing an issue with a thin white border between them. I've tried using headerShadowVisible: false in the s ...

Centering the Navbar in Bootstrap 3.0

I am currently in the process of migrating my project from Bootstrap 2.3.2 to Bootstrap 3. Unfortunately, I am facing issues with centering the navbar links, something that I was able to do easily before. Previously, I used this method: Center bootstrap&# ...

Can you help me convert this Mongoose code to use promises?

Using Mongoose's built-in promise support, I aim to streamline the process of a user sending a friend request to another user. However, even with careful error handling and sequencing in place, I find myself grappling with a slightly condensed pyramid ...

CSS navigation menu with drop-down functionality

I am currently learning CSS and HTML as I work on the CCTCcart project. When running the code in the bottom menu section, I noticed that when clicking on any menu item such as Products, the white background color merges with blue. I need to find a solution ...