Html 5 horizontal and vertical align img inside figure
Hi can someone help me horizontal and vertical align a img inside a figure
<figure class="frontpagearticlefigure">
<img class="frontpagearticleimg" src="image.png" alt="image" title="imgtitle" />
</figure>
and my css
.frontpagearticlefigure
{
display: block;
height: 140px;
width: 250px;
}
Im working w开发者_JAVA百科ith html 5
You can try using .frontpagearticlefigure img { display: inline-block; vertical-align: middle; }
or use display: table-cell
精彩评论