这是一个代码,垂直对齐仍然没有运气。尝试了很多东西放入#mylist
和放入#mylist li img
。
CSS:
#mylist
{
list-style-type : none;
padding-top : 0px;
border:1px solid red;
overflow: hidden;
}
#mylist li
{
float : left;
padding-right : 3px;
}
#mylist li img
{
}
html:
<div id="div-to-align">
<ul id="mylist">
<li><a href="#"><img src="img1.png" alt="" ></a></li>
<li><a href="#"><img src="img2.png" alt="" ></a></li>
<li><a href="#"><img src="img3.png" alt="" ></a></li>
<li><a href="#"><img src="img4.png" alt="" ></a></li>
</ul>
<span>Some text here. Everything should be centered vertically</span>
</div>