I have HTML code and I want to align content in li
-element. I have image and text info in the li
-element.
I tried vertical-align: middle
for li
-element, but it doesn't work
li img {
float: left;
display: block;
margin-right: 20px;
margin-bottom: 15px;
width: 75px;
height: 75px;
}
<ul>
<li>
<img src="images/1.jpg" alt="">
<a class="post-title" href="#">Lorem Ipsum</a>
<p class="post-date">March 05, 2015</p>
</li>
<li>
<img src="images/1.jpg" alt="">
<a class="post-title" href="#">Lorem Ipsum</a>
<p class="post-date">March 05, 2015</p>
</li>
</ul>