How can we fix the width of the container in Bootstrap

0 votes
Can i know How can we fix the width of the container in Bootstrap?
Apr 1, 2025 in Node-js by Ashutosh
• 33,370 points
515 views

1 answer to this question.

0 votes

To set a fixed width for your Bootstrap 3 container (instead of the default responsive behavior), you have several options:

Option 1: Override Bootstrap's Container Class (Recommended)

/* In your custom CSS file */

.container {

  width: 1200px; /* Your desired fixed width */

  max-width: none !important; /* Disables responsive behavior */

}


Option 2: Create a Custom Fixed-Width Container

<div class="container-fixed">

  <!-- Your content here -->

</div>


CSS 

.container-fixed {

  width: 1200px;

  margin-right: auto;

  margin-left: auto;

  padding-left: 15px;

  padding-right: 15px;

}

answered Apr 4, 2025 by anonymous

Related Questions In Node-js

0 votes
1 answer

How can i get the extension of the image in node.js?

Hello @kar You can do the following to ...READ MORE

answered Jul 16, 2020 in Node-js by Niroj
• 82,800 points
3,096 views
0 votes
0 answers

How to implement a fixed-width container in Bootstrap 3?

Can you tell me How to implement ...READ MORE

Apr 1, 2025 in Node-js by Nidhi
• 16,260 points
487 views
0 votes
1 answer

What is the purpose of the useLocation hook in React Router, and how can it be used effectively?

The useLocation hook in React Router provides ...READ MORE

answered Apr 21, 2025 in Node-js by anonymous
1,045 views
0 votes
1 answer
0 votes
1 answer

How can I implement user authentication with JWT in an Express.js app?

In an Express.js application, you can use ...READ MORE

answered Dec 17, 2024 in Java-Script by Navya
1,133 views
0 votes
1 answer

Is it possible to handle React events using the Chrome extension?

Yes, it's possible to handle React events ...READ MORE

answered Feb 22, 2025 in Node-js by Kavya
953 views
0 votes
1 answer

How can I use all the React events with Material-UI components?

The best approach is to leverage the ...READ MORE

answered Feb 22, 2025 in Node-js by Kavya
843 views
0 votes
1 answer

Why won't React events fire, or what could prevent them from firing?

If React events are not firing, several ...READ MORE

answered Feb 22, 2025 in Node-js by Kavya
851 views
0 votes
1 answer

How can i fix the helvetica error in NextJS with pdfkit-Table

It typically occurs when PDFKit (used by ...READ MORE

answered Apr 2, 2025 in Node-js by anonymous
1,751 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP