Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off the responsive feature completely from Twitter Bootstrap 3? [duplicate]

Tags:

How can I turn off responsiveness in Bootstrap 3?

I just want to develop a desktop version and when the size is different it should still appear like the desktop version.

Twitter.com does this. If you try to resize, nothing happens to the UI while my site is redesigning all the elements.

Example of how I want it: enter image description here

Anyway now how to turn off the responiveness? All help appreciated.

Also recently read that in Bootstrap 2.0 you just remove responive boostrap CSS, but in 3.0 its baked into one css file.

Thanks.

like image 247
user023 Avatar asked Aug 09 '13 12:08

user023


People also ask

How to stop responsive in Bootstrap?

Disable the responsiveness of Bootstrap by fixing the width of the container and using the first grid system tier.

Is bootstrap automatically responsive?

Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

Does Twitter still use bootstrap?

At Twitter, Bootstrap has quickly become one of our many go-to front-end tools when starting new applications and sites.


2 Answers

EDIT: My code below was written for v3.0.0RC2, but in v3.0.0 the docs got a section specifically about this question: http://getbootstrap.com/getting-started/#disable-responsive

Use the col-xs-X classes since they are constant percentage widths. Then the responsiveness comes from .container using max-width at different media sizes. You can define your own alternative to .container and use everything else like normal:

Fiddle for the example below: http://jsfiddle.net/xTePL/

HTML:

<!-- Don't use .container at all or you will have to
     override a lot of responsive styles. -->
<div class="container-non-responsive">
  <div class="row">
    <div class="col-xs-4">
      <h1>Welcome to Non-responsive Land</h1>
    </div>
    <div class="col-xs-8">
      <!-- More content, more content -->
    </div>
  </div>
</div>

CSS:

.container-non-responsive {
  /* Margin/padding copied from Bootstrap */
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;

  /* Set width to your desired site width */
  width: 1170px;
}
like image 167
Ross Allen Avatar answered Oct 23 '22 09:10

Ross Allen


Here's what worked for me:

<meta name='viewport' content='width=1190'>

I wanted a bit of a margin around my content so I also did

.container{
  width: 1150px !important;
}

Tested it on iPad and iPhone.

like image 26
machineboy2045 Avatar answered Oct 23 '22 11:10

machineboy2045