我希望图像左对齐,但文本块在剩余空间中居中对齐。我怎么做?
html:
<ul>
<li>
<img src="http://mobile-streetmaps.com/wp-content/uploads/2010/01/itunesArtwork-1-08-18-08.gif" />
<center>
<div>
<h1>Hello</h1>
<p>I R Awesome</p>
</div>
</center>
</li>
</ul>
CSS:
img {
vertical-align:middle;
display:inline-block;
}
center {
vertical-align:middle;
display:inline-block;
background-color:orange;
}
jsFiddle:http: //jsfiddle.net/PVgT6/