开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜