Why in IE7 input breaks out of its container?
http://jsfiddle.net/Q8jPM/2/
<div class="row-fluid" style="margin-top:10px;">
<div class="span12">
<div class="row-fluid">
<div class="span6">
<div class="row-fluid">
<div class="span6 " style="background:green;">
<input type="text" class="span12">
</div>
<div class="span6" style="background:blue;">
<input type="text" class="span12">
</div>
</div>
</div>
<div class="span6">
<div class="row-fluid">
<div class="span6" style="background:green;">
<input type="text" class="span12">
</div>
<div class="span6" style="background:blue;">
<input type="text" class="span12">
</div>
</div>
</div>
</div>
</div>
</div>
UPDATE: I suppose it's box-model and width issue, but is any solution with bootstrap?
Bootstrap's grid includes five tiers of predefined classes for building complex responsive layouts.
Short answer: you do need to use container , but you don't need to use row . You can put elements directly in the container or container-fluid .
container-fluid simply applies the width: 100% instead of different width for different viewport sizes. However, the layout will still responsive and you can use the grid classes as usual. See the tutorial on Bootstrap grid system to learn more about grid classes.
Just check the Grid System block on the Customize page. The @grid-columns field allows to set a different number of columns, and the @grid-gutter-width field lets you change the gutter width. Customizers are convenient when bootstrap. css is the only file you need and when you don't work with preprocessors.
this happens because IE7 does not support the css property
box-sizing: border-box;
that considers padding and border size as part of the elements width.
read more about this property here: http://paulirish.com/2012/box-sizing-border-box-ftw/
because of this, IE7 adds the padding and border size to the input width - exceeding the parent width. You will have to set those to 0 in order to get the element fit to the parent size and stay fluid.
you could try adding a wrapper element around the input and then setting the padding and border to the wrapper. This will work in all browsers
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