Reducing image size within a card using Bootstrap 4

I'm trying to add a picture to my card, but the image size is too large. I attempted to resize it using CSS, but it didn't work. Here's the code snippet I used:

    .media .img {
        height: 50px;
        width: 50px;
    }
<div class="row">
                            <div class="col-md-9 col-lg-8 mx-auto">
                                <div class="card">
                                    <div class="card-content">
                                        <div class="card-body">
                                            <div class="media ">
                                                <div class="align-self-center patient">
                                                    <img src="{{ asset('images/patient.png') }}">
                                                </div>
                                                <div class="media-body text-right">
                                                    <h3>Patient</h3>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

Answer №1

There is no need for .media .img, simply use .media img as img is not a class

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

Add a font awesome icon to an external CSS file

Want to add a Font Awesome icon to an external CSS stylesheet? If you're using Font Awesome 5 & the free icons, you can follow this code snippet: #preview .buttons .ok { border: 1px solid #F5F5F5; border-radius: 4px; width: 28px; ...

Display the button exclusively on responsive mobile views

I'm looking to enhance my website by adding a call support button with a responsive design feature. The goal is to display the button exclusively in mobile view and replace it with text in other views. Encountering challenges in toggling the visibili ...

I'm struggling to connect the output of my Button to my JavaScript function

I have been working on a new feature for my website and encountered an issue with a JavaScript function. The goal is to enable disabled input boxes when the user clicks on a "yes" button. Unfortunately, clicking the "yes" button doesn't seem to be tr ...

Smoothly scroll through divs using JQuery

Let me share an issue I'm facing. I have implemented smoothDivScrolling on my webpage. The problem is that the scrollable area containing all the items to be scrolled always ends up being larger than the actual content. When I reach the last item i ...

Error with ThreeJs OrbitControls.js functionality not operating as expected

Despite my efforts to utilize OrbitControls.js from ThreeJs by creating a folder and saving necessary files (such as GLTFLoader.js, OrbitControls.js), I encountered errors when trying to use functions within them. This led to frustrations like the one show ...

Eliminate HTML inserted into Selector

My approach to handling validator errors involves injecting HTML next to the incorrect content, which is then displayed correctly when clicked. However, I am facing challenges in removing the injected HTML once the bad data is corrected. Despite trying var ...

Vue.js: click event does not trigger transform animation

I am facing a challenge with rotating an arrow icon within a dropdown menu. Despite my efforts, the rotation does not synchronize with the appearance of the dropdown menu. Here is the Vue component code snippet: <nav> <section class= ...

When switching from JavaScript to jQuery, the button values become invisible

Currently, I have a functional app that can dynamically change the values of buttons based on user input. The current implementation is in vanilla JavaScript within the script.js file. However, I am looking to enhance the functionality and user experience ...

tooltip information fails to refresh

Can anyone explain why the tooltip is not updating properly? Even after changing the title, the tooltip remains unchanged. Is there a mistake in the code somewhere? How should I go about fixing this issue? <div class="title" [innerHTML]="shortedTitle(p ...

Creating personalized images using HTML

Looking to create a website where you can purchase personalized shoes? One unique feature is the ability to customize your pair of shoes by selecting stickers and choosing their color. These options are conveniently displayed in a panel next to the shoe im ...

Getting rid of the excess white space below the footer caused by concealed elements

In my design, I have three columns. The rightmost column is filled with 'Divs' containing collapsed information that can be scrolled through using the mouse wheel. The overflow in the center is hidden. The width of all three columns is set to 760 ...

Include an additional feature to an already established design

I have been attempting to move an element to the left using the transform property. However, there is already a pre-existing style with transform, which appears as: transform: translate3d(tx, ty, tz) What I am aiming for is to incorporate another property ...

Send back alternate HTML content if the request is not made via AJAX

Last time I asked this question, I received several negative responses. This time, I will try to be more clear. Here is the structure of a website: Mainpage (Containing all resources and scripts) All Other pages (HTML only consists of elements of that ...

What is the best way to add a `<div>` before or after a specific `<p>` element based on the client's height?

I am facing an issue with inserting a div before a paragraph element based on the given clientHeight. Specifically, I need to locate the closest paragraph element from the specified clientHeight and then add a div before or after that particular element. ...

Developing intricate views using stored procedures in asp.net mvc

Working on an ASP.NET MVC 4 template, I am seeking advice on how to design a complex view layout. I have set up a model that retrieves data from a stored procedure in a SQL Server database. The view is receiving this data through an IEnumerable<> ob ...

How can I make my div change color when the check-box is selected?

I have a dynamic table in my web application that is populated with data from a database. Each row in the table represents multiple time slots for a specific date. I am working on a feature where the background color of a time block can be changed if a che ...

Automatically updating quantity with the power of jQuery

I have created a spreadsheet where users can input their expenses and the total will update automatically. Initially, I have set some default numbers in my HTML which are editable for users to modify as needed. However, I am facing an issue with my JQuer ...

My contact form validation has hit a snag with a small bug. The email validation seems to be intertwining with the rest of my

I have implemented validation code for a contact form. When the code runs, it will identify any invalid input and display an error label. Although the validation is functioning correctly, the email input is not displaying the error label as expected. See ...

Converting Rich Text Format (RTF) Data to HTML: A Step-by

I have information stored in RTF Format within an MS Access Database. The format is as follows: {\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\f ...

Steps for organizing a list based on the number of clicks

I've created an HTML list with images of political party logos. Each logo is a grid item that can be clicked on. I want to sort the list based on the number of clicks each logo receives, essentially ranking them by popularity. However, I'm not su ...