Elevate your designs with Bootstrap Cards featuring a clickable link. Give your

I am trying to incorporate bootstrap cards into a form without using a normal link. The intention is to send the data along with other information via POST method.

However, I am facing an issue with the display. The blocks should maintain the same height, which is achieved when no link is added. But as soon as I link them, the uniformity is lost.

I have included the code below.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<li>Einbindung der CSS Dateien und Javascribt Dateien</li>
</head>

<body>

<div class="container-xl">
<div class="row">

<div class="col-6 col-md-3 col-lg-2 d-flex">
<div class="card card-body flex-fill">
<p>Long text. Long text. Long text.</p>
</div>
</div>

<div class="col-6 col-md-3 col-lg-2 d-flex">
<div class="card card-body flex-fill">
<p>Short text.</p>
</div>
</div>

</div>
   
--------------------------------------

<form>

<div class="row">
<div class="col-6 col-md-3 col-lg-2 d-flex">
<label><input type="submit" name="geraete-kategorie" class="card-input-element" value="<?=$row['id'] ?>"/>
<div class="card card-body card-input flex-fill">
<p>Long text. Long text. Long text.</p>
</div>
</label>
</div>

<div class="col-6 col-md-3 col-lg-2 d-flex">
<label><input type="submit" name="geraete-kategorie" class="card-input-element" value="<?=$row['id'] ?>"/>
<div class="card card-body card-input flex-fill">
<p>Short text.</p>
</div>
</label>
</div>

<div class="col-6 col-md-3 col-lg-2 d-flex">
<label><input type="submit" name="geraete-kategorie" class="card-input-element" value="<?=$row['id'] ?>"/>
<div class="card card-body card-input flex-fill">
<p>Short text.</p>
</div>
</label>
</div>

</div>
</form>

</body>
</html>

Live site:

Could use some help with CSS modifications to make the code functional.

Answer №1

<pre>
label {
    display: flex;
    margin-bottom: 0.5rem;
}
</pre>

Try using this solution, it should be effective.

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

Sync HTML Videos

Issue: I am currently developing a 3 column layout where certain columns need to remain sticky at the top of the viewport. In one section, I want to use the same video as a background for all 3 columns, with the specific effect of having the middle column ...

Unable to show the same error message in multiple locations using identical code

I am facing an issue where error messages are not displaying for an empty input field, while they work perfectly fine for a textarea. The if statement for the inputName seems to be working, but the else statement is not being triggered. What could be causi ...

Getting rid of a blue border from a button upon clicking

Here is the problematic section of code :root { --color-foreground-text-main: rgb(255, 72, 142); --color-foreground-text-sub: rgb(0, 114, 153); } html, body { height: 100%; } img { max-width: 100%; } #cover { background: #222 url('Reso ...

The error message "Angular formGroup requires a FormGroup instance. Kindly provide one."

I used angular reactiveforms to create a form. The default data is successfully printed on the form, however, I am facing an error in the console that says "formGroup expects a FormGroup instance. Please pass one in." Can someone guide me on how to resolve ...

The code functions properly on React Webpack when running on localhost, however, it fails to work once deployed to AWS Amplify

As I work on my React.js app, I encountered an issue with hosting pdf files on Amplify. While everything runs smoothly on localhost/3000, allowing me to access and view the pdf files as desired either in a new tab or embedded with html, the same cannot be ...

utilizing a for-each loop in order to append upcoming events to a fully

I am currently using the FullCalendar jQuery component and attempting to add events to it by iterating through a loop of divs, but for some reason it is not working as expected. Below is the snippet of JavaScript code that I am struggling with. The commen ...

How can I reset the mousemove event in jQuery?

I need to create a mechanism where I can move a div by clicking on it, and then click again to stop the div in that position. However, encountering an issue when trying to move the div again as the mousemove event does not get activated. How can this be ...

The grid flex end is behaving differently than I anticipated

I am struggling to align two buttons vertically on the right side. Here is my code snippet: const WalletsContainer = () => { return ( <Grid style={{ background: 'red' }} direction={'column'} alignItems={'flex-end'} ...

Converting SVG circle animation into textual form - a step-by-step guide!

<svg width="1000" height="100"> <circle id="orange-circle" r="30" cx="50" cy="50" fill="orange" /> <animate xlink:href="#orange-circle" attributeName="cx" from="50" to="900" dur="2s" begin="0s" ...

Obtain the text that is shown for an input field

My website is currently utilizing Angular Material, which is causing the text format in my type='time' input field to change. I am looking for a way to verify this text, but none of the methods I have tried give me the actual displayed text. I a ...

A JButton named "action" with HTML styling and a specific keyboard shortcut

My JButton is created with an Action that contains HTML in its name. To set the mnemonic on the JButton, I first need to extract the first character from the name by parsing out the HTML tags. For instance, if the JButton name is "Test Button", after re ...

Display a Java applet when HTML text elements are clicked

I am attempting to create a custom jQuery plugin, but I don't have much experience with jQuery and could really use some assistance. Here is the Java Applet that I am referencing: The applet performs certain operations and displays the result in a t ...

Utilizing Javascript to Connect with Java Web API

I'm seeking assistance with transferring a file from a browser to another device connected to a server-operated machine. I am relatively new to web application and back-end programming. The current code allows for moving a file from the server to the ...

Encountering an unexpected token error while attempting to incorporate JQuery into a React JS project

I am currently diving into the world of React.js and attempting to incorporate a side navigation bar on my homepage. However, I encountered an eslint error when trying to implement the sidebar using jQuery code. Below you will find the code snippet for the ...

What is the best way to utilize an onClick on a button to update a value that is being utilized in a useEffect hook?

I am looking for a way to dynamically change the content displayed in this section without navigating to another page. I have two sets of data - one displaying all blogs and the other showing only blogs authored by "mario". How can I implement a button cli ...

Guide to centering a list on a webpage using Bootstrap 3

Looking to create a centered list using the latest version of Bootstrap 3. Any tips? The desired list should be positioned in the middle of the page. ___________________________________________ | | | ...

Implementing Multiple Identification using JavaScript and PHP

I need to complete a simple task. Here is the code snippet: echo' <div class="col-sm-12" id="recensioni_titolo"> <form role="form" id="review-form" method="post" action="php\insert_comment.php"> ...

Learn the Method Used by Digg to Eliminate "&x=0&y=0" from their Search Results URL

Instead of using a regular submit button, I have implemented an image as the submit button for my search form: <input id="search" type="image" alt="Search" src="/images/searchButton.png" name="" /> However, I encountered an issue in Chrome and Fire ...

Unable to locate the element with the specified id: <path>

I am aiming to dynamically change the fill attribute of a specific <path> element when a page loads. Here is the detailed information about the path element: <path xmlns="http://www.w3.org/2000/svg" style="fill:#ff0000;stroke:#000000;stroke-wid ...

The HTML form does not function properly on OSX when it contains buttons with Cyrillic names in windows

After installing a site locally on my OSX, which was developed under Windows with cyrillic encoding for some string values, I encountered an issue. I noticed that certain buttons with cyrillic values were not functioning properly until I changed the value ...