What is the best way to showcase an unordered list in two separate columns using Bootstrap 4?

Challenges with Implementing Bootstrap 3 Multi-column Design in Bootstrap 4 is a query that delves into the differences and issues faced when transitioning from Bootstrap 3 to Bootstrap 4. While most solutions work, there are still some discrepancies that need addressing.

To illustrate this problem, I have created a demonstration on jsfiddle here using the following HTML code:

<div class="col-12 container" style="height: 350px;">
  <ul class="list-unstyled row">
    <li class="list-group-item col-4">Test</li>
    <li class="list-group-item col-4">Test</li>
    <li class="list-group-item col-4">Test</li>
    ...
    <li class="list-group-item col-4">Test</li>
  </ul>
</div>

The issue can be observed with the round borders not aligning correctly at the beginning and end of the list:

https://i.sstatic.net/SW6nb.jpg

Attempts to address this include:

  • Adding a border class to force rectangular borders (no impact observed)
  • Using list-group-flush to eliminate curved borders entirely (resulted in missing top bar for the first item and bottom bar for the last item)
  • Employing list-group-flush alongside first and last classes to manually add missing borders (inconclusive; fiddle link here)

As a Bootstrap beginner with limited CSS knowledge, I am seeking insights on potential oversights or solutions to this challenge. Any guidance would be greatly appreciated.

(Note: Observations were made on FF58 Windows 10, but unsure if browser compatibility plays a role)

Answer №1

It appears that Bootstrap 4 does not easily allow for customizing a styled .list-group without creating your own CSS. One workaround could be to start by removing borders and padding, then changing .list-group-item to .list-item, and finally adding border and padding classes as needed.

For example: https://jsfiddle.net/jqyq46v4/

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

Find common connections on Facebook using an app PRIOR to downloading it

Is there a way to programmatically find mutual friends between myself and an application or page? For instance, in the scenario shown below: In the image above, it's evident that prior to installing the Causes App (1) I can observe that myself and t ...

Using a template can sometimes display markup instead of the actual content when incorporating context and forms

I am a beginner with Django and I'm facing an issue while trying to display a dictionary and form on the same page. Instead of showing the actual page, it only displays the HTML markup. Below is the code snippet: home/views.py: from django.shortcuts ...

Adjust Bootstrap form positioning to be fixed at the bottom of the page

Can anyone provide assistance with positioning this form at the bottom of the page? <form> <div class="form-group"> <input type="email" class="form-control" id="" aria-describedby="emailHelp" placeholder="Enter email"> &l ...

"Step-by-step guide for incorporating a right-to-left (RTL) Bootstrap

Is there a way to make my bootstrap navbar right-to-left (RTL)? I want the logo to be on the right and the links to flow from right to left. I've tried various tricks but none of them seem to work. Here's the code I currently have: <nav class ...

Transforming current application into a responsive Angular platform

I need help making my existing Angular application, which uses Bootstrap, mobile responsive. Do I have to rewrite the entire CSS and HTML files, or is there another way to achieve this? As a newcomer, any suggestions or guidance would be greatly apprecia ...

utilizing the default placeholder image for videos and audios within the tags

In my web application, users can share music and videos that will be stored on a server used by the application. Some audio/video files come with posters or thumbnails attached to them. I want to display these posters along with the audio or video using HT ...

A method for automatically refreshing a webpage once it switches between specific resolutions

On my page www.redpeppermedia.in/tc24_beta/, it functions well at a resolution of over 980px. However, when the resolution is brought down to 768px, the CSS and media queries alter the layout. But upon refreshing the page at 768px, everything corrects itse ...

Personalized Tumblr-style button

Hey there, I've been working on creating a custom Tumblr-like button and tried adding an iframe above it to make it clickable. However, something seems to be off as it's not functioning properly. I'm still trying to wrap my head around how i ...

What impact does Bootstrap .ratio have in making the img show up over the offcanvas menu?

Is there a way to prevent a ratioed image from appearing above the offcanvas menu? When using Bootstrap 5 and specifying a 16x9 ratio for the image... <div class="ratio ratio-16x9 my-3"> <img width="768" height=&q ...

Restrict the Number of Columns in GridView

I am currently working with a gridview that displays product information. I'm trying to find a way to limit the description field so that only the first few lines are shown if it is too long, and also resize the image to fit into the image column whil ...

Minimize the styling of the input placeholder CSS

Here is the CSS I am using: #login-box ::-webkit-input-placeholder { color: #666; } #login-box :-moz-placeholder { color: #666; } #login-box ::-moz-placeholder { color: #666; } #login-box :-ms-input-placeholder { color: #666; } I attem ...

Issues with displaying Angular 6 NGX chips correctly

Currently, I am utilizing `ngx-chips` in my projects and storing my objects in an array. This allows me to use the following example: <div> <h3>Tags within an autocomplete component (clear on blur events)</h3> <tag-inp ...

Create beautiful HTML forms with Laravel Collective Forms in Laravel 5.7

I am currently using the Laravel Collective form code shown below: {!! Form::open(['action' => ['CategoryController@sub8', $item1->id], 'method' => 'post']) !!} {{Form::label('postaladdress', &apos ...

Dimensions of image details

I am working on an article that includes an image with a description. The challenge is that the description should not exceed the width of the image, but since the image width varies, fixing the width with a class .article-image is not a viable solution. ...

What can I do to keep my button transparent after it has been clicked?

white button I attempted to create a vertical navigation bar with a background image, but when I clicked the button, it changed to white. How can I ensure that the buttons stay white? I've experimented with primary-outline options I found through my ...

Dropdown Placement Based on Button Click

Looking to create an interactive dropdown menu with the Alloy UI Dropdown Component that appears when a user clicks on one of four buttons. The goal is for this dropdown to be positioned to the left of the clicked button. var toolsDropdown = new Y.Dropdow ...

Can a container be sized based only on the width of one of its children?

Take a look at this snippet of html: <div class="container> <div class="header"> </div> <div class="content"> </div> <div class="footer"> </div> </div> I am aiming for the containe ...

Loading jsp content into a div dynamically within the same jsp file upon clicking a link

Currently, I am working on creating a user account page. On this page, my goal is to display related JSP pages in a div on the right side when clicking links like 'search user' or 'prepare notes' on the left side. In my initial attempt ...

Why is there a mismatch between CSS and Angular 6 selector components?

website.html <website-chat></website-chat> chat-page.html <h1>Greetings</h1> chat-script.ts import { Component, OnInit } from '@angular/core'; @Component({ selector: 'website-chat', templateUrl: '. ...

Guide on Generating Dynamic JSON to Set and Retrieve Values for Forms and Displaying the Bound Values

I'm a beginner in Ionic 3 and I'm having trouble creating a page that redirects to another page without validation. I want to display the data on the new page, but it's not working. Please help! I also want to create a dynamic JSON object a ...