1
沒有對齊,這是我的代碼:CSS列表浮法留下
HTML:
<li><div class="card">
<img src="uploads/image/default_profile.jpg" width="195" height="260" />
<p><strong>Dr./BGen. Antonio L. Tamayo</strong><br>
<strong>AFP, FPCHA, Ph. D</strong></p>
<p>Chairman of the Board and CEO<br>
Founder, University of Perpetual Help System DALTA</p>
</div></li>
<li><div class="card">
<img src="uploads/image/default_profile.jpg" width="195" height="260" />
<p><strong>Daisy M. Tamayo</strong><br><strong>RN, MAN, Ph. D</strong></p>
<p>Vice Chairman and Treasurer<br>
Co-Founder, University of Perpetual Help System DALTA</p>
</div></li>
</ul>
CSS:
ul.card-wrap
padding: 0
li
font-size: 16px
display: inline-block
.card
width: 195px
它對齊,但它走出容器
ul.card-wrap
padding: 0
li
float: left
font-size: 16px
display: inline-block
.card
width: 195px
我該如何解決這個問題?
你能提供一個小提琴嗎? – Aer0
沒有抱歉,我不能 – Hansmagz
嘗試看看她:http://stackoverflow.com/questions/12871710/what-does-the-css-rule-clear-both-do –