Expanding content to full width before collapsing sidebar in Bootstrap 4

Having a sidebar with an appended div on load using JQuery. The issue is that the sidebar space remains if the sidebar button is not pressed.

When the sidebar collapses, the div fills in the space like this:

<button class="btn btn-primary fa fa-filter" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
        Filter
      </button>
        <div class="innerf-pages section content "  >
            <div class="fh-container mx-auto">
                <div class="row my-lg-5 mb-5" id="my">
                    <!-- grid left -->
                    <div class="side-bar col-lg-3 collapse" id="collapseExample">
                        // Some Divs
                    </div>

                    <div class="col-lg-9 mt-lg-0 mt-5 right-product-grid ">
                    <!-- card group  -->
                    <div class="card-group" id="card-group">

                             <div class="col-lg-4 col-sm-6 p-0">
                                <div class="card product-men p-3">
                                    <div class="men-thumb-item">
                                       // some content
                                    </div>
                                </div>
                              </div>
                      </div>
                </div>


          **//end**

                    </div>

                </div>

Answer №1

To ensure it remains open, you could implement the ":onhover" CSS event. Alternatively, utilize jQuery to monitor if the event is ongoing.

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

Position a grid item in the center

Can someone help me with centering my container's item? I am struggling to align the third item to the center using display: grid. Previously, I attempted to use flexbox but found it to be less effective for a responsive layout. .projetos { f ...

Utilizing a standard variable to apply a CSS property in Knockout JS

Is it possible to set a css property using an if condition with a regular variable instead of observables? Here's an example: a.html file: <span class="label" data-bind="text: isApproved, css: sampleglobalvar == true ? 'label-success' : ...

issues with getting bootstrap datetimepicker to function properly

I've been trying to integrate the bootstrap datetimepicker plugin into my web app by following all the installation instructions correctly. However, it doesn't seem to be working. I even tried some examples from others on jsfiddle that were refer ...

Is there a way to smoothly incorporate a new animation into a page, while ensuring that existing elements adjust to make room for it?

I am looking to smoothly fade and move a hidden element (display:none) within the page, shifting other elements to animate into their new positions as necessary. When I reveal the hidden element by changing it to "display:initial," it should seamlessly a ...

Rotate background image upon each visit

I have a collection of around 50 background images that I want to display randomly each time a user visits my website. The idea is to provide a unique background image for every visit, without saving any information about which image was previously display ...

Eliminate any blank spaces in the string before comparing the option value to determine whether the DIV should be

I am trying to create a function that hides or shows a specific DIV based on the option value selected from the product. Due to automatic addition of option values by Shopify, some options have more than one word with spaces in between. Since I cannot chan ...

FormData append not functioning as expected

Within a jQuery script, the FormData object is used like this: var formData = new FormData($('#content-submit')[0]); formData.append("Title", $("input[name=Title]").val()); formData.append("Url", $("input[name=Url]").val()); ...

Having trouble populating input field with data returned from ajax request

Performing an Ajax Request $.ajax({ type: "GET", url: "http://localhost/CI2/index.php/login/testfunc", data: {macro: selectedmacro}, async: false, success: function (data) { $('#tinyeditor').val(data); $(&apos ...

Storing child elements of an XML document in a JavaScript array

I am seeking advice on how to store XML child files in a JavaScript array. Below is an example of the XML file: <?xml version="1.0" encoding="UTF-8"?> <questionaire> <title>Festival survey</title> <author>Lars Gro ...

Using querySelector to Target Elements by their InnerHTML Content

Is it possible to target an element by its innerHTML directly without the use of loops? Is there a way to achieve this with something like document.querySelector('div[innerHTML="Sometext"]') or document.querySelector('div[textcontent="Som ...

Access SCSS variable values in Angular HTML or TypeScript files

So, I've been looking into whether it's feasible to utilize the SCSS variable value within HTML or TS in Angular. For instance: Let's say I have a variable called $mdBreakpoint: 992px; stored inside the _variable.scss file. In my HTML cod ...

There is no POST data present in the jquery ajax request

I have been attempting to send data back to a controller using ajax from a lightbox, but unfortunately, it is not working as expected. The issue arises when I select values from two populated select lists and click submit – an error message briefly appe ...

When transmitting a base64 image to the server using an AJAX POST request, the forward slashes ("/") are being replaced by ampersands ("%")

I need to send an image as base64 to the server. This is how I am making the request: $.post(Config.serviceURL('captureImage/' + memid), { imageString: imageData }, function(data) { alert("Image uploaded!", data); }).fail(function() { ...

Tips on positioning one image on top of another image without the images shifting when the screen size is adjusted

Struggling to position the lightbulbs above the floor plan? Even after setting the floor plan image's position property to 'relative', the lightbulb images refuse to cooperate. Here is a snippet of the HTML code: <div> <img src ...

Unable to initialize styles in a newly created Angular CLI project

Just finished setting up a new project with the angular cli. Encountering an issue when trying to link the styles.css file in index.html <link rel="stylesheet" type="text/css" href="styles.css"> Getting the following error in Chrome's dev too ...

Error message due to an undefined function in Angular datatables Fixed Columns

I recently implemented angular datatables with fixed column in my application. Here is the HTML code I used for the view: <div class="row" ng-controller="PerformanceCtrl"> <table id="example" datatable="" class="stripe row-border or ...

Retrieve the JSON data and pass it to the AJAX success function

I have a PHP file that contains encoded JSON data. I am trying to extract the values for maxVote and Id from this encoded JSON. Below is the content of my PHP file named results.php: <?php $result = array(); array_push($result,array("maxV ...

"Seamless Compatibility with Different Browsers for 3D Models

I am tasked with developing a three-dimensional model using browser-based technology. It is imperative that this application is compatible with all major browsers. I am seeking an alternative to Java applet and flash. Can someone assist me with the follo ...

Display Wordpress images in a grid format with the col-md-4 class

Hey everyone, I'm currently working on a project where I have uploaded multiple images in a custom post type as featured images in WordPress. I'm trying to integrate Bootstrap with WordPress to display these images side by side in columns of col- ...

Exploring the internet with Internet Explorer is like navigating a jungle of if statements

I am facing an issue with my code that works well in Chrome, but encounters errors in IE. The if condition functions correctly in Chrome, however, in IE it seems like the first condition always gets executed despite the value of resData. Upon analysis thro ...