Twitter bootstrap 使用Twitter将div与底部对齐';s引导程序2.x
我试图将一个DIV对齐到容器的底部,但它不起作用 使用相对位置和底部0,跳出容器 我的代码:Twitter bootstrap 使用Twitter将div与底部对齐';s引导程序2.x,twitter-bootstrap,alignment,Twitter Bootstrap,Alignment,我试图将一个DIV对齐到容器的底部,但它不起作用 使用相对位置和底部0,跳出容器 我的代码: 框1 您使用类.well,它在底部添加了20px的边距 添加css: .well {margin-bottom:0;} 请参阅:如果要将第一个跨距与行底部对齐,则有一个hack。看看这个 设置位置:相对样式设置为外部行流体类。并设置位置:绝对到第一个跨距。要在其位置设置第二个跨距,必须按以下给定格式添加偏移量4: <div class="row-fluid" style="border:
框1
您使用类.well
,它在底部添加了20px的边距
添加css:
.well {margin-bottom:0;}
请参阅:如果要将第一个跨距与行底部对齐,则有一个hack。看看这个 设置
位置:相对代码>样式设置为外部行流体类。并设置位置:绝对代码>到第一个跨距。要在其位置设置第二个跨距,必须按以下给定格式添加偏移量4:
<div class="row-fluid" style="border: 1px red dashed;position:relative;">
<div class="span4 well text-center" style="position:absolute; bottom:0;">
<p>BOX1</p>
</div>
<div class="span4 text-right well offset4" style="">
<form action="demo_form.asp" style="margin:0px;">
<input style="padding: 0;margin-top: 10px;" class="input-mini" type="text" name="user" placeholder="USER">
<input style="padding: 0;margin-top: 10px;" class="input-mini" type="password" name="PASS" placeholder="PASS">
<button style="margin-right: 3px;" type="submit" class="btn btn-small btn-primary disabled" disabled="disabled">
<i class="icon-user icon-white"></i>
</button>
</form>
</div>
</div>
框1
<div class="row-fluid" style="border: 1px red dashed;position:relative;">
<div class="span4 well text-center" style="position:absolute; bottom:0;">
<p>BOX1</p>
</div>
<div class="span4 text-right well offset4" style="">
<form action="demo_form.asp" style="margin:0px;">
<input style="padding: 0;margin-top: 10px;" class="input-mini" type="text" name="user" placeholder="USER">
<input style="padding: 0;margin-top: 10px;" class="input-mini" type="password" name="PASS" placeholder="PASS">
<button style="margin-right: 3px;" type="submit" class="btn btn-small btn-primary disabled" disabled="disabled">
<i class="icon-user icon-white"></i>
</button>
</form>
</div>
</div>