Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the width of container to 1400px?

I need to use custom container in Bootstrap 3 to 1400px. How can I count grid column width and and @grid-gutter-width?

like image 461
Lui Avatar asked Oct 05 '16 07:10

Lui


People also ask

How do you increase the width of a container?

Go to the Customize section on Bootstrap site and choose the size you prefer. You'll have to set @gridColumnWidth and @gridGutterWidth variables. For example: @gridColumnWidth = 65px and @gridGutterWidth = 20px results on a 1000px layout.

How do I resize a container in Bootstrap?

You can either use <div class="container-fixed"> or your own media query in which you can specify the custom width for various resolution. Show activity on this post. The default Bootstrap . container class has 15px padding on both left and right sides.

How do I make a full width container in CSS?

Using width, max-width and margin: auto; Then, you can set the margins to auto, to horizontally center the element within its container. The element will take up the specified width, and the remaining space will be split equally between the two margins: This <div> element has a width of 500px, and margin set to auto.

What is container max-width?

A Container is a Div block with pre-defined styles. It comes with a 940-pixel max-width on larger displays that keeps your content centered relative to the browser window. On smaller devices (like phones and tablets), Containers extend across the full width of the screen.


2 Answers

To change the container size from core, you have to declare your bootstrap container variable again, if you use bootstrap scss.

$container-max-widths: (
  md: 720px,
  lg: 960px,
  xl: 1140px
) ;
like image 52
coder618 Avatar answered Sep 20 '22 13:09

coder618


If you use bootstrap SASS port you can easily do that by changing _bootstrap-variables.scss.

In _bootstrap-variables.scss search for $container-large-desktop and change its value to (1370px + $grid-gutter-width).

Default $grid-gutter-width is 30 px. You can change it also.
If you change $grid-gutter-width then change the $container-large-desktop accordingly to get your container size 1400px.

To know how to work with bootstrap SASS check it out : https://github.com/twbs/bootstrap-sass

like image 38
Golam Mortuza Avatar answered Sep 20 '22 13:09

Golam Mortuza