The "list-group" class is not functioning properly in Bootstrap 4

I've been diligently working on a project with Bootstrap 4. In one particular section, I need to display images in rows within a list-group that pulls images from a folder. However, when using Bootstrap 4, the image sizes are too large, unlike when I switch back to Bootstrap version 3.3.7 where they display correctly without being oversized. Does this signify that Bootstrap 4 no longer supports list-groups? Am I overlooking something crucial here? Below is a snippet of my code:

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

With Bootstrap 4, the above image appears in its full size.

Here's the code snippet from my Bootstrap 4 implementation:

<section id="gallery">
    <div class="container">
        <h3>Images Gallery</h3>
        <div class="row">
            <div class="list-group galleryy">
                @if($images->count())
                    @foreach($images as $image)
                        <div class='col-sm-4 col-xs-6 col-md-3 col-lg-3'>
                            <a class="thumbnail fancybox" rel="ligthbox" href="/images/{{ $image->image }}">
                                <img class="img-responsive" alt="" src="/images/{{ $image->image }}" />
                                <div class='text-center'>
                                    <small class='text-muted'>{{ $image->title }}</small>
                                </div>
                            </a>  
                        </div>
                    @endforeach
                @endif
            </div> 
        </div> 
    </div> 

Working bootstrap version:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

Not working on:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="13717c7c67606761726353273d263d20">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

Answer №1

If you're utilizing Bootstrap 4, your code structure should resemble this:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1e7c71716a6d6a6c7f6e5e2a302b302d">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    <section id="gallery">
        <div class="container">
            <h3>Images Gallery</h3>
            <div class="row">
                @if($images->count())
                    @foreach($images as $image)
                    <div class='col-sm-4 col-xs-6 col-md-3 col-lg-3'>
                        <div class="list-group galleryy">
                            <a class="thumbnail fancybox" rel="ligthbox" href="/images/{{ $image->image }}">
                                <img class="img-fluid" alt="" src="/images/{{ $image->image }}" />
                                <div class='text-center'>
                                    <small class='text-muted'>{{ $image->title }}</small>
                                </div> <!-- text-center / end -->
                            </a>
                       
                        </div> 
                    </div> 
                    @endforeach
                @endif
            </div> 
        </div> 
    </div>

For further details on 'list-group', please refer to the link provided below:

https://getbootstrap.com/docs/4.6/components/list-group/

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

Enhancing NG Style in Angular 6 using a custom function

Today, my curiosity lies in the NG Style with Angular 6. Specifically, I am seeking guidance on how to dynamically update [ngStyle] when utilizing a function to determine the value. To better illustrate my query, let me present a simplified scenario: I ha ...

Unfortunate Outcome: CSS Request Results in 404 Error

Recently, I made a transition from having a single-page website to using an express server for my website. During this process, I had to modify the file paths. However, I am encountering difficulties in loading my css and js files. Upon inspecting the dev ...

OrbitControls in THREE.JS fail to function properly when a DOM Element is layered on top of the scene

I am attempting to position labels as elements with position:absolute; over a THREEJS scene. The issue arises when the mouse hovers over one of the labels (the red box in the example below), causing the events that trigger OrbitControls to be "halted" by t ...

The crossIcon on the MUI alert form won't let me close it

I am facing an issue with my snackBar and alert components from MUI. I am trying to close the alert using a function or by clicking on the crossIcon, but it's not working as expected. I have used code examples from MUI, but still can't figure out ...

"Is it possible to disable the transition animation in mat-sidenav of Angular Material without affecting the animations of

My Angular application features a mat-sidenav that is organized like this: <mat-sidenav-container> <mat-sidenav [mode]="'side'"> <!-- Sidenav content --> </mat-sidenav> <mat-sidenav-content ...

How does bootstrap-confirmation on datatable trigger server-side code without needing a click?

I am working on a bootstrap project and using the datatables plugin. I want to implement a confirmation message before deleting a row. I have successfully achieved this when populating the table using a repeater and linkButton. However, now I want to achie ...

Blank YouTube Popup Modal

I am in the process of creating a pop-up modal that contains an embedded YouTube video, but my modal is not displaying properly. I am utilizing Bootstrap and have two separate sections along with JavaScript code. When the modal appears, it remains empty. I ...

Display website content with a Bootstrap modal popup

When using the bootstrap modal popup, it's important to ensure that the content displayed does not already exist on the page. The issue of images from the page appearing on the popup is demonstrated in the image linked below. Can someone provide guida ...

transitioning from font-awesome v4 to the latest version, v5

For a while now, I have been utilizing a responsive template. However, I am interested in updating its fa-module from v4 to v5. By downloading the free web package, replacing "font-awesome.min.css" with "all.min.css", and adjusting all references to the ...

Retrieve the flag from the database and securely store it within the authentication process

Seeking assistance with setting a flag option within my user table and integrating it into an if statement before redirection. Any help is appreciated. protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { //establ ...

Checking form entries and updating HTML

Prompt Description: In my endeavor to authenticate a <form> on the server side, I have opted to send form inputs as JSON to the back-end (an express.js app) using AJAX. Post-validation, another JSON is dispatched to the front-end with a structure ak ...

What is the best way to keep the navbar contained within the parent div (hero image) no matter the size of the screen?

After working on adjusting my website layout for different screen sizes, I encountered an issue with the navbar overflowing the parent image when viewed on my laptop. Despite trying both relative and absolute positioning for the .navbar element and setting ...

Need a clearfix solution for Internet Explorer 6/7?

While developing a website, I have come across the micro clearfix hack from here. It's working well, but I do have a question regarding it that I'd like some clarification on. Within the clearfix hack on the webpage, there is the following code ...

What is the best way to eliminate excess space on the right side of a div element

I recently utilized a column structure with bootstrap 4, resulting in a layout with 1 row containing 2 columns: <div class="left"> <hr class="container hline"> <div id="main" class="container border"> <di ...

Centering an image (svg) vertically inside a link tag

I've been struggling to vertically center the config button (#config) and none of the options I've tried worked the way I wanted. Here is a link to my CodePen: http://codepen.io/fenwil/pen/ONRXwz Here is the crucial part of the code that need ...

What is the best way to align the checkbox and label in a React form?

I've been struggling to align the labels next to the checkboxes on this form. I'm currently utilizing React with React-Hook-Form for validation and state management (you can find the code on GitHub: https://github.com/cipdv/ciprmt-mern/blob/main/ ...

What is the best way to extend the final column of a table across the entire width?

Here's the code I'm working with: .frm-find-people table td:nth-child(1) { padding: 5px 15px; width: 100px } .frm-find-people table td:nth-child(2) { border: 1px solid red; } <form class="frm-find-people"> <table> ...

Customize the appearance of polygons in OpenLayers 2 by adjusting the fill color and opacity

I am aiming to use different fill colors and opacity values for various shapes (such as Triangle, Circle, Square, Hexagon, etc.). Although I can draw the shapes, set different titles, and stroke colors with the code below, I'm struggling to define th ...

The card-group is off-center within the column

I am facing a challenge with the alignment of 3 cards within a card-group that are contained in a div with the col class, which is wrapped by a div with the row class, all within a div with the container class. Currently, the cards are not centered. I hav ...

What is the best way to allow wider list items to overflow their absolutely positioned container?

My challenge involves a list that is dynamically populated, and I require it to be wider than its absolutely-positioned parent (specifically a custom <select> element implementation). #wrapper { position: relative; border: 1px ...