Differences between Bootstrap 3.3.7 and Bootstrap 4

After successfully building my application on Bootstrap 4 and incorporating Bootstrap-Table and Bootstrap-DateTime picker plugins, I ran into display issues when trying out Bootstrap-Select. It was then that things went haywire. Upon closer investigation, I discovered that bootstrap.min.css was the cause of the problem (other files are yet to be confirmed). Whether I used the version (bootstrap-3.3.7) provided with Bootstrap-Select or the original one from Bootstrap 4 that I had been using so far. Below you'll find the rendering of both css files.

Here is the rendering issue encountered with css from bootstrap-3.3.7 - The active tab does not display content until clicked on; controls are misaligned and characters appear smaller: https://i.sstatic.net/Lfp10.png

https://i.sstatic.net/6ypRC.png

The rendering issue observed with css from bootstrap 4 - The select box fails to display options, but character rending is correct: https://i.sstatic.net/ToKqc.png

Finally, here is a snippet from my html file:

         //**** THIS DOES NOT WORK IF PLACED INSIDE $(document).ready(function () {} ****
        $('#table').bootstrapTable({
            url: 'GetListeDemandeurs',
            locale: 'fr-CA',
            pagination: true,
            paginationLoop: true,
            search: true,
            clickToSelect: true,
            singleSelect: true,
            sortable: true,
            sortOrder: 'asc',
            idField: 'Code_Demandeur',
            sortName: 'Code_Demandeur',
        });
        var $table = $('#table');
        //**** END NON-WORKING SECTION ****

        //**** Instance de la Bootstrap-DateTime picker ****
        $('.form_date').datetimepicker({
            language: 'fr',
            weekStart: 1,
            todayBtn: 1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,
            forceParse: 0
        });
        //**** FIN Bootstrap-DateTime picker ****

        $(document).ready(function () {

            var selectedRecord = null;
            $(function () {
                //**** Click action for the row ****
                $table.on('click-row.bs.table', function (e, row, $element) {   //**** COMMENTED SECTION: BUTTON DOES NOT FUNCTION ****
                    $('.success').removeClass('success');
                    $($element).addClass('success');

                    //**** Encapsulating the chosen row ****
                    var index = $table.find('tr.success').data('index');
                    selectedRecord = $table.bootstrapTable('getData')[index];

                    //**** Enable modify and delete buttons upon selecting a row ****
                    document.getElementById('btnModif').disabled = false;
                    document.getElementById('btnSupp').disabled = false;
                });
            });




        });
<!DOCTYPE html>
<html>
<head>
    @ {
        ViewBag.Title = "Applicants (List)";
    }
    <title></title>


    
    @* ========================================= *@
    



    @* **** Required meta tags **** *@
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    @* **** END required meta tags **** *@

    <script src="~/Scripts/jquery-3.3.1.min.js"></script> @**** JQUERY Version **** *@

    @* **** Bootstrap-Select **** *@
    <script src="~/Scripts/umd/popper.min.js"></script>
    @*<script src="~/Scripts/jquery-3.3.1.min.js"></script>*@
    <script src="~/Scripts/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <link href="~/Scripts/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet" />
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="~/Content/bootstrap-select.min.css">
    <!-- Latest compiled and minified JavaScript -->
    <script src="~/Scripts/bootstrap-select.min.js"></script>
    <!-- (Optional) Latest compiled and minified JavaScript translation files -->
    <script src="~/Scripts/i18n/defaults-fr_FR.min.js"></script>
    @* **** FIN **** *



    ...

 </body>
</html>

Answer №1

I successfully implemented the entire solution.

Here is a snippet of my HTML head:

 <script src="~/Scripts/jquery-3.3.1.min.js"></script> @**** JQUERY Version Used **** *@

    @* **** Font-Awesome Reference **** *@
    <link href="~/css/font-awesome.min.css" rel="stylesheet">
    @* **** END reference **** *@

    @* **** Bootstrap-Select Dropdowns CSS / js Reference **** *@
    <script src="~/Scripts/umd/popper.min.js"></script>
    <script src="~/Scripts/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <link href="~/Scripts/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/Content/bootstrap-select.min.css">
    <script src="~/Scripts/bootstrap-select.min.js"></script>
    <script src="~/Scripts/i18n/defaults-fr_FR.min.js"></script>
    @* **** END reference **** *@

    @* **** Bootstrap, Bootstrap-Table CSS / js Reference **** *@
    <link href="~/Content/bootstrap-table.css" rel="stylesheet" />
    <script src="~/Scripts/bootstrap-table/bootstrap-table.js"></script>
    <script src="~/Scripts/bootstrap-table/locale/bootstrap-table-fr-FR.min.js"></script>
    @* **** END reference **** *@

    @* **** Bootstrap, Bootstrap-DateTime picker CSS / js Reference **** *@
    <script type="text/javascript" src="~/Scripts/bootstrap-datetimepicker/bootstrap-datetimepicker.js" charset="UTF-8"></script>
    <script type="text/javascript" src="~/Scripts/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script>
    <link href="~/Content/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
    @* **** END reference **** *@

I have made adjustments in the body section and am prepared to proceed.

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

As the Page Expands, Elements Shift into New Positions

I'm currently focused on enhancing the accessibility of my web pages. A challenge I've encountered is that when I expand the width of my page, the elements appear to shift further down the screen. It seems like this issue may be related to settin ...

Enhancing the Alignment of a Bootstrap Navbar with CSS

Having trouble centering the listed items (excluding the image and title) in the middle of the navbar. Tried various solutions with no luck! Any suggestions on how to tackle this issue? <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a ...

When a table undergoes a dynamic reload, the formatting for the columns fails to display properly

After fetching image metadata from an API call, a table is dynamically generated on page load. Subsequently, when new images are uploaded, the function responsible for building the table is called again to include this new data. However, despite the CSS st ...

Different Ways to Customize Button Click Events in Angular 9 Based on Specific Situations

In my Angular 9 web application development, I frequently need to integrate Bootstrap Modals like the example below: <div class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="do ...

Creating dynamic height based on width using JavaScript

I'm trying to make a rectangle responsive based on the width of the window. This is my current logic: aspectRatio = 16 / 9 win = { width: window.innerWidth, height: window.innerHeight, } get browser() { const width = this.win.width - 250 ...

Span element hides the text in the background

Is there a more efficient way to accomplish this task? My current approach involves creating a slide-in background color effect when hovering over a link. However, I am encountering some difficulties with the CSS implementation. In my setup, each link cont ...

Width of ListBox Item

How can I adjust the width of items in my RadListBox that are being inserted programmatically to prevent multiple items from displaying on a single line? Currently, the items are added to the listbox in C# code like this: rlbAssigned.Items.Add(new RadLis ...

Element Not Adjusting to Content Size

I am encountering an issue with my div. I have floated an image to the right and placed my text beside it. My aim is to create a div with a linear gradient, however, the div ends up filling the entire page. How can I make my div adjust to fit only its con ...

Tips to prevent modal impacts on underlying elements?

When I click on a button, a modal pops up. However, the background contents seem to spread out and sometimes scroll automatically when the modal appears. I have searched for a solution to this issue but have been unsuccessful. Can anyone please help me ide ...

Avoid allowing users to accidentally double click on JavaScript buttons

I am working with two buttons in a Javascript carousel and need to prevent users from double-clicking on the buttons. Below is the code I am using: var onRightArrow = function(e) { if (unitCtr<=unitTotal) { unitCtr++; TweenLite.to(p ...

Having trouble with the WordPress style file not functioning properly

I'm currently facing an issue while trying to upload a CSS file and a JavaScript file to a custom theme on WordPress. When I open the webpage, nothing appears and there are no elements displayed. However, when I delete the functions.php file, the webp ...

Creating a square shape in Twitter Bootstrap to frame an item on a webpage

I've been working on creating a webpage that looks similar to the image provided. I've managed to get about 90% of it done, but there are a couple of issues I'm facing: How can I create a square with a triangle at the bottom as shown in th ...

Arrange divs in vertical columns

My markup is fixed and I am only allowed to add <div> elements to the container. Here is the current structure: <div class="container"> <div class="box" id="box1">1</div> <div class="box" id="box2">2</div> < ...

Is the sidebar hidden only in Internet Explorer 7 and specifically not shown on one particular page?

So, I've been working on a website using Wordpress and created some custom page templates. However, I recently discovered that the sidebar on this specific page doesn't show up in IE 7. This page is using the lawyer.php template. I'm not su ...

Is there a way to fix the close button on the menu so that it works more than once?

I have developed a JavaScript-powered navbar, but I am facing an issue with the closing button. It seems to work only once. If I try to open and close the menu repeatedly, the closing button stops working. I suspect there might be an error in my code, but ...

Tips for altering the color of an activated Bootstrap dropdown toggle

When the Dropdown menu is open, I would like to customize its default colors. Specifically, I want to change the border color and background using CSS. https://i.sstatic.net/vKwLE.png Below is the HTML code snippet: <div class="row menu"> <ul ...

A versatile CSS solution for fixed background images that stretch to fit any screen height across multiple browsers

Similar Question: Stretch and Scale CSS Background I am interested in finding a method to create a background with specific criteria: - remain fixed in place - adjust proportionally based on the window's height - work across all browser types or ...

Collapsible feature in Bootstrap malfunctioning after initial use

I am currently developing a website using PERSONA as the CMS and have implemented collapsible elements on the page using Bootstrap. The website is using Bootstrap Version 3.3.7 and PERSONA includes an internal version of jQuery. For reference, you can acce ...

Is there a way to align my green button beside the red button instead of below it?

I'm looking to rearrange the positioning of my green button on the screen. When I initially created the button, it ended up below my red button, but I want them to be displayed side by side. I haven't attempted any solutions because I am a beginn ...

CSS clearfix doesn't appear to be functioning properly

I've been experimenting with using clearfix instead of the clear both property, but it's not working as expected. Despite following tutorials, the issue persists. How can I troubleshoot this and make it function properly? * { marg ...