increasing the size of the bootstrap container causes the webpage to become unresponsive

I want to increase the size of the Bootstrap container. I added this CSS code to make it bigger:

@media (min-width: 992px) {
        .container.max-width-940 {
            max-width: 1390px !important;
        }
    }

 @media (min-width: 1200px) {
        .container.max-width-940 {
            max-width: 1390px !important;
        }
    }

.container.max-width-940

{
    min-width: 1390px !important;
}

and then applied it in my div tag on my webpage:

<div  style="background-color:white;border-radius:10px;align-content:center;align-self:center;vertical-align:middle;width:100%" class="container max-width-940 body-content" />

However, whenever I do that, the page becomes unresponsive. When I resize the page, controls and text start extending beyond the screen. Here is the code:

<... continue rewriting ...>

Answer №1

If you want to increase the width of the bootstrap container, here's a smart way to do it:

@media (min-width: 1440px) {
    .container {
        max-width: 1240px !important;
    }
}
@media (min-width: 1640px) {
    .container {
        max-width: 1440px !important;
    }
}
@media (min-width: 1840px) {
    .container {
        max-width: 1640px !important;
    }
}
@media (min-width: 2040px) {
    .container {
        max-width: 1840px  !important;
    }
}

$container-max-widths: (
    sm: 700px,
    md: 800px,
    lg: 960px,
    xl: 1140px
) !default;

$grid-breakpoints: (
    xs: 0,
    sm: 576px,
    md: 768px,
    lg: 992px,
    xl: 1400px,
    xxl: 2000px
);

It's important to note that changing the min-width won't have any effect in this case because bootstrap operates based on max-width.

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

Two headings using the same tags appear distinctively rendered

Recently, we added an iframe to our company's website that I have been helping manage. This iframe is responsible for handling requests sent to our organization. Interestingly, the headings on our website are styled using the following CSS: color: # ...

Unable to adjust row height within the gridview component

Below is my ASP code: <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateEditButton="true" DataSourceID="AccessDataSource1" AutoGenerateColumns="False" DataKeyNames="ID" RowStyle-CssClass="editPhotoGridFormat" ...

What is the best method for aligning buttons in a row with all the other buttons?

I have been attempting to display two buttons, id="strength" and id="minion", when a certain button, id="expandButton", is clicked. I want these two buttons to be positioned on either side of the button that triggers their cre ...

Utilize an iframe input field to initiate a Jquery event

Thanks to this amazing platform, I was able to discover a solution for expanding an iframe upon clicking using HTML and Jquery. However, my issue remains unresolved. I have successfully expanded the iframe with text, but I want to use input fields within ...

What is the best way to retrieve user data and format the output using JavaScript into a structured form?

I am trying to achieve the functionality shown in this image: https://i.sstatic.net/svzvc.png My goal is to extract user input from a form and display it on my webpage using JavaScript. Below is the code snippet that I have been working on. Code: f ...

Calculating the number of characters in each textarea by iterating through them with a

I am currently working on a project where I need to implement a character count feature for each field in my form. Below is a snippet of code from my C# file: List<Document> record= _repository.Document.GetChecklist(entity.checklist, Convert.ToInt32( ...

AngularJS causing issues with Materializecss dropdown menu operation

I'm currently working on a web application using Materializecss and AngularJS for the front-end. However, I've encountered an issue with the dropdown menu component of Materialize not functioning as expected. Here's an example of the dropdo ...

Having Multiple Login Forms on a Single Page

I have encountered an issue with my login form code. It works perfectly as a single form, but I need to have 20 of these forms on one page. Despite my efforts to duplicate the code for each new form and adjusting the IDs, I am unable to make more than one ...

Attempting to extract a parameter from a URL and pass it as an argument to a function for the purpose of locating objects based on

I am trying to retrieve data from a URL http://localhost:3000/share/user=sampleuser to display objects with an author value that matches the one in the URL. However, I encountered an error when attempting to call a function that extracts the value from t ...

`Error occurring with React-router when refreshing nested pages causing CSS not to load`

Setting up a react-router for my first React webapp has been a bit tricky. It seems to be functioning properly except for the issue with CSS not loading on nested pages when they are refreshed. The CSS works fine for single level paths like /dashboard, bu ...

Hide/Trim the upper right corner of the button

I am looking to customize the top right corner of a button in order to add a badge in that area. Here is an example of what I have in mind: https://i.sstatic.net/j0xdz.png https://i.sstatic.net/uFzDw.png The image on the right showcases my current setup ...

"Test your Knowledge" - Interactive Quiz with PHP and MySQL

After spending the last two days working on this project, I find myself stuck with some messy and confusing code. Despite searching through countless resources for explanations, I still haven't been able to find a solution. The task at hand is buildi ...

Is it possible to monitor and keep a record of every modification made to an HTML element?

Can anyone suggest an effective method to monitor changes made to an HTML element? I attempted to utilize JavaScript with jQuery but was unsuccessful. $('div.formSubmitButton input[type="submit"]').change(function(event){ alert( ...

Disappearing act: The vanishing act of the Bootstrap 4 Smart Scroll Mobile

Utilizing the Smart Scroll feature from in Bootstrap has been successful on desktop, but issues arise on mobile devices. When scrolling down and returning to the top, the navbar experiences glitches by hiding again. Attempting solutions from Bootstrap 4 S ...

I'm struggling to successfully insert and retrieve data from a MySQL database using Express.js. I need to figure out how to make these operations work seamlessly across the board

HTML CODE <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title>CHAT APPLICATION</title> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+ ...

Developers specializing in Google Maps navigate to a particular destination

I have been working on an app that provides users with the best options for places to visit, utilizing Google Maps technology. Here is what I have accomplished so far: Show the user their current location Show the user possible destinations (with marker ...

How can Spring and AngularJS (HTML) work together to retrieve the Context Path?

Currently, I am working with Spring and AngularJS. I haven't encountered any issues displaying my index.html using Spring in the following way: @RequestMapping(value="/") public String index() { return "/app/index.html"; } Is there a way for me ...

Creating Custom Styled Divs Dynamically

I am currently trying to customize the appearance of divs that are displayed on the front page. https://i.sstatic.net/BsEaM.png My platform is WordPress, and my goal is to have each new post align alternately left and right starting with the first post. ...

Unable to conceal element if it is devoid of content

<div id="web-link" class="infoline"> <i class="fa fa-link fa-2x fa-fw coloriconfa"></i> <a href="<?=$data['post']['url']?>" target="_blank"><?=$data[ ...

Challenges encountered when integrating images with Bootstrap's grid system

I have implemented a simple Grid System to create a small "Portfolio" showcasing images (4 columns and roughly 6 rows), however, the display looks like this <div class="container"> <div class="row"> <div class=" ...