I'm using Bootstrap for my website and I need to create a container with size of 1250px, but the problem is when I change the class of Bootstrap container the responsiveness won't work anymore.
What should I do?
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.
Also, you must use . col-md-6 like class to specify width of your section within a row where md is replaceable by lg and sm as well. md stands for Medium sized devices like laptop,desktop etc.
Just setting 'container-fluid' will create a 100% width container. Wrapping the whole thing in a 1250px width container will cause your container not to be responsive. The best thing to do is to assign a 'max-width' to your fluid container, I've included the markup below:
<div class="container-fluid" style="background-color:#CDCDCD; max-width:1250px">
Container-Fluid
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With