我有我的文本對齊從div頂部的問題。從div頂部對齊HTML/CSS文本
這裏是HTML:
<div id="services">
<div class="langelis">
<div class="icon">
<img src="images/knyg.jpg" alt="knyga" />
</div>
<div class="txt">
<h1>Lorem Ipsum</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s..</p>
</div>
</div>
<div class="clear"></div>
</div>
這裏是CSS:
#content #main #services {
width: 1010px;
height: auto;
min-height: 320px;
margin: 50px auto;
}
#content #main #services .langelis {
width: 510px;
height: auto;
min-height: 140px;
position: relative;
border: 1px #000 solid;
}
#content #main #services .langelis .icon {
width: 65px;
min-height: 140px;
height: auto;
float: left;
border: 1px #000 solid;
}
#content #main #services .langelis .txt {
width: 440px;
height: auto;
float: left;
border: 1px #000 solid;
}
如何使 文本
Lorem存有 Lorem存有是印刷和排版的只是虛擬文本行業。 Lorem Ipsum自從16世紀以來一直是業界標準的虛擬文本..
從.txt div的中心對齊?感謝您的幫助
是否希望文本垂直或水平cen tered? – darthmaim 2013-03-24 16:10:26
我想從垂直對齊頂部的div。 – user2204367 2013-03-24 16:11:21