How to use bootstrap for websites with larger layout?

Asked

Viewed 123 times

1

Well, I have always developed bootstrap websites and never modified the standard container size which is 1170px because there was never a need. Now I have a 1900 wide layout.

I also always use the sequence col-Md-12 col-Sm-12 col-Xs-12

What is the correct procedure to adapt the container the size of my layout? I have to use the -lg- to develop websites whose screen is larger than 1200px?

  • I think you have to overwrite your css to the bootstrap in the container. container{max-width:1900px;width:100%}, only this should solve. Make sure your css are called after those of bootstrap

  • Try using class container-Fluid instead of container.

2 answers

1

Use Bootstrapxl library (extra large or extra large).

It is suitable for screens over 1600px wide.

Link to the Github: Bootstrapxl

  • Placing this library, the layout will already adjust to the large screens and I just continue to do as I am already doing?

  • You have to add his CSS classes! col-xl etc..

0

If you want to modify the layout only for large screens, you can add the following in your CSS:

@media screen and (min-width: 1980px){ . container{ width: 1900px; } }

The width is 1980px is arbitrary. I put this value, but you can put others. The ideal is that it is bigger than 1900px, to give a "break" to the container.

Add this rule to another CSS to override the Bootstrap rule. It is not advisable to change the Bootstrap file itself.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.