Skip to content

Commit 0a78e79

Browse files
committed
fixes twbs#10406: Update grid to use width on .container instead of max-width as IE8 improperly computes width
1 parent 5eead87 commit 0a78e79

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

dist/css/bootstrap.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ pre code {
905905

906906
@media (min-width: 768px) {
907907
.container {
908-
max-width: 750px;
908+
width: 750px;
909909
}
910910
.col-sm-1,
911911
.col-sm-2,
@@ -1059,7 +1059,7 @@ pre code {
10591059

10601060
@media (min-width: 992px) {
10611061
.container {
1062-
max-width: 970px;
1062+
width: 970px;
10631063
}
10641064
.col-md-1,
10651065
.col-md-2,
@@ -1222,7 +1222,7 @@ pre code {
12221222

12231223
@media (min-width: 1200px) {
12241224
.container {
1225-
max-width: 1170px;
1225+
width: 1170px;
12261226
}
12271227
.col-lg-1,
12281228
.col-lg-2,

dist/css/bootstrap.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

getting-started.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,9 @@ <h1 id="disable-responsive">Disabling responsiveness</h1>
275275
<h3>Steps to disable page responsiveness</h3>
276276
<ol>
277277
<li>Omit the viewport <code>&lt;meta&gt;</code> mentioned in <a href="../css/#overview-mobile">the CSS docs</a></li>
278-
<li>Remove the <code>max-width</code> on the <code>.container</code> for all grids with <code>max-width: none !important;</code> and set a regular
279-
width, for example <code>width: 970px;</code>. Be sure that this comes after the default Bootstrap CSS.
280-
You can optionally avoid the <code>!important</code> with media queries or some selector-fu.</li>
278+
<li>Override the <code>width</code> on the <code>.container</code> for each grid tier with a single width, for example <code>width: 970px !important;</code> Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the <code>!important</code> with media queries or some selector-fu.</li>
281279
<li>If using navbars, remove all navbar collapsing and expanding behavior.</li>
282-
<li>For grid layouts, use <code>.col-xs-*</code> classes in addition to, or in place of, the medium/large ones.
283-
Don't worry, the extra-small device grid scales to all resolutions.</li>
280+
<li>For grid layouts, use <code>.col-xs-*</code> classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.</li>
284281
</ol>
285282
<p>You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed).
286283
This disables the "mobile site" aspects of Bootstrap.</p>
@@ -710,6 +707,9 @@ <h3>Internet Explorer 8 and 9</h3>
710707

711708
<p>Visit <a href="http://caniuse.com/">Can I use...</a> for details and additional browser support of CSS3 and HTML5 features.</p>
712709

710+
<h3>Internet Explorer 8 and box-sizing</h3>
711+
<p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, and <code>max-height</code>. For that reason, as of v3.0.1, we have moved from <code>max-width</code> on <code>.container</code>s.</p>
712+
713713
<h3>IE Compatibility modes</h3>
714714
<p>Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <code>&lt;meta&gt;</code> tag in your pages:</p>
715715
{% highlight html %}

less/grid.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
@media (min-width: @screen-sm) {
118118
.container {
119-
max-width: @container-sm;
119+
width: @container-sm;
120120
}
121121

122122
.col-sm-1,
@@ -194,7 +194,7 @@
194194

195195
@media (min-width: @screen-md) {
196196
.container {
197-
max-width: @container-md;
197+
width: @container-md;
198198
}
199199
.col-md-1,
200200
.col-md-2,
@@ -274,7 +274,7 @@
274274

275275
@media (min-width: @screen-lg-min) {
276276
.container {
277-
max-width: @container-lg;
277+
width: @container-lg;
278278
}
279279

280280
.col-lg-1,

0 commit comments

Comments
 (0)