Set the height of one element to equal the height of a different element using CSS

This is the code that I am working with:

<div class="row"> 
    <div class="box-body">
        <div class="col-lg-12">
            <div class="wrapper2">
            <div class="col-xs-6">
                <ul id="matchline-ul" class="todo-list matchline-options">
                @foreach($question->answers as $answer)
                    @if($answer->is_key == 1)
                    <li id="matchline-static">
                        <span class="width-100" id="match-lines-options">
                        <input type="hidden" name="{{ $question->id }}[]" value="{{ $answer->order }}">
                            <div id="take-match-line-answer-text">
                                <span class="text padding-right-20">{!! $answer->text !!}</span>
                            </div>
                        </span>
                    </li>
                    @endif
                @endforeach
              </ul> 
            </div>

            <div class="col-xs-6">
                <ul class="todo-list">
                @foreach($question->answers as $answer)
                    @if($answer->is_key == 0)
                    <li id="matchline-dynamic">
                        <span class="handle width-100">
                        <input type="hidden" name="{{ $question->id }}[]" value="{{ $answer->order }}">
                              <div id="take-order-answer-text">
                       <i class="fa fa-bars"></i>
                    </div>
                            <div class="float-left">

                                <span class="text padding-left-10">{!! $answer->text !!}</span>
                            </div>
                        </span>
                    </li>
                    @endif
                @endforeach    
                </ul>
            </div>
        </div>
    </div>
    </div>
</div>

Based on this code, I want the cells on the left to always have the same height as the cells on the right when moving them up and down.

If anyone has a solution to achieve this, please let me know. Thank you!

Answer №1

Switching from lists or divs to tables will automatically adjust the dimensions of the elements

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

Is it possible to vertically align variable length text within a container of fixed height?

One common method for centering text inside a div is to use the following CSS trick: .center-div { display:table-cell; vertical-align: middle; } The issue arises when the text within the div varies in length and I require the container to have fi ...

How to Automatically Display the First Tab in Bootstrap 3

Having a dynamic modal with two tabs, I aim for #tab1 to always be the default tab upon opening the modal. The issue arises when the modal is opened, #tab2 is clicked, and then the modal is closed. Subsequent reopenings still display #tab2. See JSFiddle e ...

Error with adaptable menu

I am attempting to develop a responsive menu similar to the Bootstrap nav bar using only CSS. I have managed to get the functionality working, but the positioning of the menu grabber is incorrect and I'm unsure how to correct it. The grabber should al ...

When the button is clicked, remove the border-bottom

Looking for help with CSS to hide the border-bottom of a button when clicked? I've attached an image for reference. Any suggestions or solutions would be greatly appreciated! View attached imageView attached image I've tried using active, focus ...

What steps should I take to create a JavaScript-based downloader application?

I am looking for a way to sell some files from my Web Server to clients. I have created my own HTTP server and I have experience programming in HTML, CSS, and a little bit of JavaScript. While I have seen tutorials on creating download links with HTML 5, I ...

"Efficiently handle multiple instances of the same name using AJAX, JavaScript

I have a PHP-generated multiple form with HTML inputs containing IDs and NAMEs. I am struggling to capture all this information. When I click the "Done" button, everything is marked as completed due to the button names. <?$command = "SELECT * FROM exam ...

Adjust the container within the column to match the height of the column in the bootstrap grid

Why is the green container expanding over the blue column when I apply height: 100% or h-100? Is there a way to make it fit just the remaining height of the column? <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstra ...

I am interested in generating a report for the protractor-html-reporter in the form of an .html file

Currently, I am conducting end-to-end testing using Protractor. To generate a comprehensive report of all the test cases, I have employed Protractor-html-reportor. This tool creates an .html file containing detailed information on each test case. Everyth ...

Tips for changing the content of a td element to an input field and removing the displayed value

I am facing an issue with a dynamic table that displays names and input fields. When a name is displayed in a table row, the user has the option to delete that name. I am able to remove the value from a specific table row, but I am struggling to replace th ...

Effective Ways to Transfer Data from Angular to CSS in an HTML Table

I am working on an Angular web app that includes an HTML table. The data for this table is retrieved from a database via a service and displayed as text. One of the columns in the table represents a Status, which I want to visually represent as a colored ...

Styling tricks for rotating carousel images using CSS animations

I'm currently working on a carousel component that functions without the use of JavaScript. While I have made significant progress towards my goal, I am facing challenges with the animation itself. The desired behavior is for the slides to animate o ...

Creating a cell in HTML/CSS with wrapped data

Is there a way to properly wrap data in the table instead of getting a scroll bar when the template name is too long? I would like it to automatically go to the next line. <table class="selectablePreviousOrder dashboard"> <tr ng-class-odd=" ...

Error: knockoutjs - unable to locate ko

Here is the knockoutjs code that I have written: $(function () { function QuizViewModel() { var self = this; self.previousQuestions = ko.observableArray([]); self.questions = ko.observableArray([]); self.thisQuestion = ko.observable() ...

"Utilizing JQuery to enhance task management by implementing a delete function

I need help figuring out how to create a function that can delete tasks from my todo list. Currently, each task has its own remove button, but I want to implement a single remove button at the bottom that removes checked or crossed out tasks. Any suggestio ...

Ensure that the <aside> elements span the entire width of their containing parent element

I am currently designing a website and I am aiming for a specific layout. Any advice on how to achieve this would be greatly appreciated. The header of the page consists of: a logo aligned to the left within an <a> tag 2 widgets placed in <asid ...

Is there a way to deactivate a tab when it's active and reactivate it upon clicking another tab in Angular?

<a class="nav-link" routerLink="/books" routerLinkActive="active (click)="bookTabIsClicked()" > Books </a> I am currently teaching myself Angular. I need help with disabling this tab when it is active ...

What is the best way to position the underline to appear beneath the second line in mobile view?

I have successfully incorporated a code to add a blue underline to the company name. However, in mobile view, the blue line appears on the first line. How can I adjust it so that it starts from the second line? Below is my CSS code: label { margin: 0; ...

Broken CSS dropdown menu issue

Recently, I encountered an issue with a hoverable drop-down menu that has been functioning smoothly for years. After adding a new sub link, the code broke. Here is the code for the menu: #divMenu, ul, li, li li { margin: 0; padding: 0; } #divMenu { ...

Active tab in HTML

In my implementation based on this example code from https://www.w3schools.com/howto/howto_js_tabs.asp, I have a specific requirement. I want the tab for "Paris" to remain active even after the page is refreshed if the user has clicked on the button for "P ...

Maintaining active navigation state in JQuery/JavaScript after clicking a link: tips and tricks

While many resources discuss adding the active class to a nav link using jquery, there is less information on maintaining the active state after the nav link has been clicked. After experimenting with code from various sources, I have attempted to set ses ...