0
나는 상대적으로 트위터 부트 스트랩 세계와 % 기반 너비에 익숙하지 않고 무엇을 쉽게 달성해야하는지 혼란 스럽다.센터링 떠 다니는 콘텐츠 트위터 부트 스트랩
왼쪽의 각 페이지를 .subimg
에 내 페이지에 배치하려고합니다. 분명히 margin:0 auto
은 정적 그리드가 아니기 때문에 작동하지 않습니다. 부모 div에 텍스트 정렬 센터를 사용하지 않았습니다. 내 태그는 다음과 같습니다 :
<style>
.subimg{float:left;}
.row-fluid{text-align:center;}
</style>
<div class="row-fluid"><!-- begin row -->
<div class="span12 subimgstrip">
<div class="subimg">
<a href="#">
<img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/1.jpg"/>
<h6>Customize Settings</h6>
</a>
</div>
<div class="subimg">
<a href="#">
<img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/2.jpg"/>
<h6>Set Specific Criteria</h6>
</a>
</div>
<div class="subimg">
<a href="#">
<img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/3.jpg"/>
<h6>Customize Alerts</h6>
</a>
</div>
<div class="subimg">
<a href="#">
<img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/4.jpg"/>
<h6>Create Antibiograms</h6>
</a>
</div>
<div class="subimg">
<a href="#">
<img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/5.jpg"/>
<h6>Isolate Information</h6>
</a>
</div>
</div>
</div><!-- end row -->
의 스타일을 제공하는 것입니다 떴다 그 당신이 너비 또는 부모를 알지 못하면 떠올랐다. 그런 다음 float div가 가운데에 나타날 수 있도록 정확한 마진을 적용 할 수있다. – Pete
오른쪽, 그냥 float (duhh 순간)을 사용하여 설정 영역 밖으로 내용을 가져 가고 있음을 알게되었다. 'display : 인라인 블록'나를 위해 그것을 해결하는 것 같다. 왜 내가 그걸 사용하지 말아야 할 이유가 있니? – gschervish
내가 생각할 이유가 없다. – Pete