The size of the card image and content area will remain constant based on the specified percentage

Looking for some guidance as I am still learning. I need the card below to have a fixed width of 38% for the image area and 62% for the content area, regardless of the size of the content (the height can increase if there is more text).

In the image above, you can see that the width of the image changes based on the card title. I want the card to only increase in height and maintain a fixed image-to-content ratio as specified above.

Card code:

<div class="ibm-columns mainCard ibm-widget-processed ibm-sameheight-processed" data-items=".ibm-card" data-widget="setsameheight" style="width: 100%;">
                <div class="uc1 card ibm-col-12-3" style="display:block">
                    <div class="ibm-card mobileFlex ibm-no-border" style="height: auto;">
                        <div class="ibm-card__image">
                            <img id="use-case-img-1" class="thumbnailImage" src="data:image/png;=" alt="card_3"></div>
                        <div class="ibm-card__content">
                                <p id="use-case-title-3" class="cardTitle">IBM Watson Learning experience system</p>
                                <p id="use-case-sub-title-3" class="cardSubtitle">Learn how to find customers</p>
                            <p class="ibm-ind-link">
                                <a href="javascript:;" onclick="loadUseCasePage('2')" class="ibm-forward-link ibm-light"><span class="ucExplore">Explore</span></a>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="uc4 card ibm-col-12-3" style="display:block">
                    <div class="ibm-card mobileFlex ibm-no-border" style="height: auto;">
                        <div class="ibm-card__image">
                            <img id="use-case-img-4" class="thumbnailImage" src="data:image/png;" alt="card_4"></div>
                        <div class="ibm-card__content">
                                <p id="use-case-title-4" class="cardTitle" style="height:78px">UC4</p>
                                <p id="use-case-sub-title-4" class="cardSubtitle">IBM customer usecase 4 subtitle change</p>
                            <p class="ibm-ind-link">
                                <a href="javascript:;" onclick="loadUseCasePage('3')" class="ibm-forward-link ibm-light"><span class="ucExplore">Explore</span></a></p>
                        </div>
                    </div>
                </div>
            </div>

Answer №1

Include flex-shrink:0 in the ibm-card__image element

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

What could be causing the slow loading time of my Shopify App developed using Next.js (React)?

I recently followed a tutorial at However, I am facing severe performance issues with my app. It loads extremely slowly when changing tabs, whether it's running on ngrok, localhost, or deployed on app engine. I'm new to React, Next.js, and Shop ...

Show a Kendo Pie Chart that reflects information from the grid dataset

I am using KendoUI - Grid component Is there a way to transform this into a Kendo Grid? For example: I have set up a Kendo grid (table) with local data. When I click on the "Generate chart" button, I want the filtered data from the table to be used to cr ...

How can I transfer data from a text box to a combo box?

I am currently engaged in developing a web application that utilizes HTML, CSS, and PHP. However, I am interested in learning how to pass the value from a text box to a combo box. Below is the section of HTML code related to this query. Additionally, it ...

Angular material chips showcase a row of five chips

I am working with the basic mat-chips from angular material and I want to arrange them in rows of five without increasing their size: Chip1 Chip2 Chip3 Chip4 Chip5 ..................(space left) Chip6 Chip7 Chip8 Chip9 Chip10 ...............(space le ...

Is it possible to use AJAX to submit a form and then redirect to a different webpage?

My website has a search feature that is present on all pages. I am currently working with jQuery/AJAX to gather the search input data, process it, and then display the results on a dedicated search results page. Below is the HTML code for the search secti ...

Unable to reach webmethod with jQuery Ajax post request due to URL rewriting

I am having trouble with my jQuery AJAX function not calling my webmethod. Take a look at my code below: $.ajax({ type: "POST", url: "Search.aspx/GetCustomers", data: '{pageIndex:' + pageIndex + ',searchText:"' + $('#H ...

Replace all anchor tags containing href="#" with the Javascript function Void(0) using jQuery

Currently, I am attempting to update all anchor tags using href="#" and changing the value to JavaScript:Void(0) instead of just # running throughout the entire application. However, it seems that this change is being applied to all anchor tags, even tho ...

Error: The variable 'xxxxxx' is not recognized

Encountering an issue while trying to pass data via an onclick event and receiving the error message "Uncaught ReferenceError: 'xxxxxx' is not defined" var ShowDetails = function (insuredID) { $.ajax({ type: "GET", ...

Add design to the footer during a specific event using Javascript

Here is the CSS code I am working with: .footer { font-family: "lato", sans-serif; padding: 20px; line-height: 1.2; text-align: right; background: #eee; color: #0D47A1; font-size: 13px; height: 80px; position: fixed; right: 0px; botto ...

Transforming a Shadertoy experiment into a customized Three.js playground on my local machine

I am currently working on a local shader sandbox project inspired by a Shadertoy created by lennyjpg. I have been referencing two Stack Overflow questions and answers (one, two) for help. The goal is to convert the Shadertoy code to use Three.js for a larg ...

Having trouble configuring AJAX and PHP to work together

Here's the situation I'm dealing with: I have HTML, JS, and PHP files. In the PHP file, there is an associative array containing default values to populate form elements in the HTML file. I'm trying to use AJAX to retrieve data from the PHP ...

Angular findIndex troubleshooting: solutions and tips

INFORMATION = { code: 'no1', name: 'Room 1', room: { id: 'num1', class: 'school 1' } }; DATABASE = [{ code: 'no1', name: 'Room 1', room: { id: 'num1', ...

Scrolling Bootstrap tabs

Here is the code snippet provided below: JavaScript: var hidWidth; var scrollBarWidths = 40; var widthOfList = function(){ var itemsWidth = 0; $('.list li').each(function(){ var itemWidth = $(this).outerWidth(); itemsWi ...

Conceal a div element using a button through JavaScript

I've been scouring various online resources for solutions, including Stack Overflow and W3Schools, but I haven't had any luck so far. Here's a simplified version of my current code: <script language="javascript"> function remove() ...

Real-time File Updates Display with Node.js and Express.js

Seeking guidance on whether there is a Node module available to utilize the Express module for displaying real-time updates in the browser using data from a file. I have a regularly updated .csv file and I am looking to showcase these updates instantly on ...

What are some creative ways to provide video responses to a list of questions?

My task is to create a popup that includes questions and video responses. The challenging aspect for me is how to ensure each question displays a different video in the same location. Additionally, when the user first opens the popup, the initial question ...

Conceal content after a specific duration and display an alternative in its position, continuously repeating the loop

Imagine creating a captivating performance that unfolds right before your eyes. Picture this: as soon as the page loads, the initial text gracefully fades away after just three seconds. In its place, a mesmerizing animation reveals the second text, which ...

Tips for triggering the onChange event in Formik and initiating a re-render of other components

As someone who is new to React, I am currently working on a webpage with 2 forms. The first form has only one input field while the second form is a component imported from another file. Despite trying to use onChange to update the initial value (initialVa ...

What is the best way to transfer variables between two Vue files?

How can I transfer a variable between two Vue files? Hello, in my SendCode.vue file, I have a variable named NewEmail that I would like to use in another file called changePass.vue. Is there any way to do this? Can someone offer assistance? Thank you</p ...

The CSS properties of 'hidden' mimic those of 'flex'

On my website, I have a logo that is hidden until the screen reaches a certain size. Despite using both "flex" and "hidden" classes for styling, I am encountering an error suggesting that they do the same thing. Removing either class disrupts the intende ...