When I do boostrap I have to use the class "row" ...
When you look at my test design:
Why I am forced with a margin-left of -30px?
With this html I would expect 3 rows sharing each column 33% of the whole available width:
<div class="container">
<div class="row">
<div style="background-color: pink;" class="span4">
This is a label
</div>
<div style="background-color: violet;" class="span4">
This is a textbox
</div>
<div style="background-color: slateblue;" class="span4">
This is a button
</div>
</div>
<div class="row">
<div style="background-color: orange;" class="span4">
This is a label
</div>
<div style="background-color: orangered;" class="span4">
This is a textbox
</div>
<div style="background-color: yellow;" class="span4">
This is a button
</div>
</div>
<div class="row">
<div style="background-color: seagreen;" class="span4">
This is a label
</div>
<div style="background-color: green;" class="span4">
This is a textbox
</div>
<div style="background-color: lightgreen;" class="span4">
This is a button
</div>
</div>
</div>
The gray area with the buttons is from this code:
<div style="background-color: gray;">
<div class="pager">
<div class="pull-left">
<a href="#" class="btn" data-bind="css: { disabled: !hasPrevious() }, click: previous">previous</a>
<a href="#" class="btn" data-bind="css: { disabled: !hasNext() }, click: next">next</a>
</div>
<div class="pull-right">
<span data-bind="text: stepNumber()" />
<span>/</span>
<span data-bind="text: stepsLength" />
</div>
</div>
<hr />
<!-- ko compose: { model: activeStep,
transition: 'entrance' } -->
<!-- /ko -->
</div>
Why does the whole 3-column design fall together when I remove the -30px margin-left?
How should I change my code to really get a 3 column layout each column having the same width. This is what span4 should do.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…